if ($session == 'PM') { $b .= " selected"; } $b .= ">PM</option>\n <option value='BOTH'>BOTH</option>\n </select>"; $b .= "\n <input type=submit id=submit name='verify' value='Verify' />\n </form></center>"; if (isset($_POST['verify'])) { $b .= "\n <center>\n <table cellspacing=0 cellpadding=2 border=0 bgcolor=white>\n <tr>\n <th>Course</th>\n <th># Students</th>\n <th># Attend Marks</th>\n </tr>"; /** * Get the classes/courses for THIS Ed Center */ $result = get_classes_for_verifyattend($cid, $today, $session); while ($row = $result->fetch_assoc()) { // need to get students for current class, not course otherwise withdrawn will thorw it off... $result2 = get_active_students_for_course($row['course_id'], $today); //$result2 = get_students_for_course($row['course_id']); $count2 = $result2->num_rows; $sql3 = "\n SELECT * from AbsTransactions\n WHERE AbsDate='" . $today . "'\n AND SectionID = '" . $row['SectionID'] . "'\n "; $result3 = queryMSsql($sql3); $count3 = mssql_num_rows($result3); $b .= "\n <tr"; if ($count2 != $count3) { $b .= " style=\"background-color:#ff9999; font-weight:bold;\""; } $b .= ">\n <td>" . $row['course_name'] . "</td>\n <td align=center>" . $count2 . "</td>\n <td align=center>" . $count3 . "</td>\n </tr>\n "; } $b .= "\n </table></center>"; } $main .= make_box($t, $b); } else { $main .= login_error(); }
function getCurrentTeachersFromSMS() { $sql = "\r\n SELECT username, password, buildingID, LOWER(CAST(uid as varchar(36))) as uid, email, firstname, lastname\r\n FROM USERS\r\n WHERE (buildingID = 13 OR buildingID = 14)\r\n AND (NOT (email IS NULL))\r\n AND (teacher = 'True')\r\n "; $result = queryMSsql($sql); return $result; }
if ($db->error) { print $db->errno . " : " . $db->error . "<br>"; exit; } $sql->close(); } /** * */ /** * NOW for SMS * Should not need to see if a reccord exists since I push grades up starting right off * in the beginning of the year. */ $sql = "UPDATE StudentGradeRecords\n SET Comment='" . ms_escape_string($_POST['gradeComment']) . "'\n WHERE STGUID='" . $stguid . "' AND SectionID='" . $SectionID . "' AND SchoolYear='" . $schoolYear . "'"; $result = queryMSsql($sql); } $cid = -1; $sid = -1; if (isset($_SESSION[$_CONF['sess_name'] . '_selected_class'])) { $cid = $_SESSION[$_CONF['sess_name'] . '_selected_class']; $result = get_class_info($cid); $row = $result->fetch_assoc(); $term_id = $row['term_id']; $interimDueDate = $row['interimsDueDate']; $gradesDueDate = $row['gradesDueDate']; $className = $row['course_name']; $termName = $row['term_name']; $teacherName = $row['first_name'] . " " . $row['last_name']; $tid = $_SESSION[$_CONF['sess_name'] . '_myUID']; }