예제 #1
0
     $file_description = makeSQLsafe($row['file_description']);
     foreach ($_POST['los'] as $id => $uid) {
         //$b .= "Sending to ".$uid."<br />";
         $sql = "INSERT into dropbox (file_id, file_owner, file_recipient, file_path, file_name, file_description)\n\t\t\t\t\t\tValues(" . $_POST['fid'] . "," . $myID . "," . $uid . ",'" . $file_path . "','" . $file_name . "','" . $file_description . "')";
         $result = $db->query($sql);
         //$b .= $sql."<br />";
     }
     //$main .=  make_box($t,$b);
 } elseif (isset($_POST['select_students'])) {
     /** display a list of students to send to **/
     $b = "<center><form enctype=\"multipart/form-data\" action=index.php?lev=" . $_SESSION[$_CONF['sess_name'] . '_lev'] . "&cat=" . $_SESSION[$_CONF['sess_name'] . '_cat'] . " method=\"post\">";
     $b .= "Now select the recipients.<br />";
     $result = get_students_for_teacher($myID);
     $values = array("first_name", "last_name");
     $key = "user_id";
     $los = make_array_from_mysql($result, $key, $values, " ");
     $b .= make_multi_select_list($los, "los");
     $b .= "\n\t\t\t\t<input type=hidden name=send />\n\t\t\t\t<input type=hidden name=fid value=" . $_POST['fid'] . " />\n\t\t\t\t<input type=submit name=deliver value=Send />\n\t\t\t\t</form></center>";
     $main .= make_box($t, $b);
 } else {
     $t = "Send File";
     $b = "<center><form action=index.php?lev=" . $_SESSION[$_CONF['sess_name'] . '_lev'] . "&cat=" . $_SESSION[$_CONF['sess_name'] . '_cat'] . " method=\"post\" name=\"dropBox_Send\" >";
     /**	Get a list of files in  MY save dir to select from **/
     $sql = "SELECT * from dropbox \n\t\t\t\tWHERE file_owner=" . $myID . " AND file_recipient=" . $myID;
     if ($result = $db->query($sql)) {
         $lof = array();
         while ($row = $result->fetch_assoc()) {
             $lof[$row['id']] = $row['file_name'];
         }
         /** make_selection_list($list,$selected=-1,$select_name,$form, $what, $change="off")**/
         $b .= "Select a file :";
예제 #2
0
파일: hoursReport.php 프로젝트: knichel/AIT
                 $att = array_merge($att, get_student_attendance($sid, $cid, $_SESSION[$_CONF['sess_name'] . '_current_school_year'], $_SESSION[$_CONF['sess_name'] . '_myCenter']));
             }
             foreach ($att as $a => $i) {
                 foreach ($i as $d => $info) {
                     $minutes += $info['minutes'];
                 }
             }
             $b .= "<td align=center>" . $cname . "&nbsp;&nbsp;" . (int) ($minutes / 60) . ":" . sprintf("%02d", $minutes % 60) . "</td></tr>";
         }
         //$b .= make_attendance_table($att);
     }
     $b .= "</table>\n                    </center>";
     $main .= make_box($t, $b);
 } elseif (isset($_SESSION[$_CONF['sess_name'] . '_selected_course'])) {
     $result = get_students_for_course($cid);
     $students = make_array_from_mysql($result, "user_id", array('first_name', 'last_name'), " ");
     $t = "Student WBL Hours Report";
     $b = "\n            <center>\n            <table>\n            ";
     foreach ($students as $uid => $uname) {
         $minutes = 0;
         $sname = $uname;
         $sid = $uid;
         $loc = get_student_core_class_list($sid, $tid);
         foreach ($loc as $cid => $cname) {
             $att = array();
             $b .= "<tr><td>" . $sname . "</td>";
             if (isset($_POST['year'])) {
                 //$att = array_merge($att,getSMSStudentAttendance($sid,$cid, $_POST['year'],$_SESSION[$_CONF['sess_name'].'_myCenter']));
                 $att = array_merge($att, get_student_attendance($sid, $cid, $_POST['year'], $_SESSION[$_CONF['sess_name'] . '_myCenter']));
             } else {
                 //$att = array_merge($att,getSMSStudentAttendance($sid,$cid, $_SESSION[$_CONF['sess_name'].'_current_school_year'],$_SESSION[$_CONF['sess_name'].'_myCenter']));
예제 #3
0
 $sList = make_array_from_mysql($result, "user_id", array("first_name", "last_name"), " ");
 $studSelection = make_selection_list($sList, $sid, 'a_s_id', "active_students", "Student", "on");
 $t = "Hours By Student (Active)";
 $b = "<center><br />";
 $b .= "<form action=index.php?lev=" . $_SESSION[$_CONF['sess_name'] . '_lev'] . "&cat=" . $_SESSION[$_CONF['sess_name'] . '_cat'] . " method=POST name=active_students>";
 $b .= $studSelection;
 $b .= "<input type=hidden name=hoursByStudent id=hoursByStudent />";
 $b .= "</form>";
 $b .= "</center>";
 $main .= make_box($t, $b);
 if (isset($_POST['a_s_id'])) {
     include 'hoursReport.php';
 }
 /** now take care of the inactive students... **/
 $result = get_users_for_attendance($_SESSION[$_CONF['sess_name'] . '_myCenter'], 'isStudent', 'N', $orderBy = "users.last_name, users.first_name");
 $sList = make_array_from_mysql($result, "user_id", array("first_name", "last_name"), " ");
 $studSelection = make_selection_list($sList, $sid, 'ia_s_id', "inactive_students", "Student", "on");
 $t = "Attendance By Student (Inactive)";
 $b = "<center><br />";
 $b .= "<form action=index.php?lev=" . $_SESSION[$_CONF['sess_name'] . '_lev'] . "&cat=" . $_SESSION[$_CONF['sess_name'] . '_cat'] . " method=POST name=inactive_students>";
 $b .= $studSelection;
 $b .= "</form>";
 if (isset($_POST['ia_s_id'])) {
     include 'hoursReport.php';
 }
 $b .= "</center>";
 $t = "Attenance by School District";
 $b = "";
 $b .= "\n        <center>\n        <form action=index.php?lev=" . $_SESSION[$_CONF['sess_name'] . '_lev'] . "&cat=" . $_SESSION[$_CONF['sess_name'] . '_cat'] . " method=POST id=\"hoursBySchoolForm\" name=\"hoursBySchoolForm\">\n            <table><tr><th>School</th><td>" . $schoolSelect . "</td></tr></table>\n            <div id=\"attendBySchoolDialog\">\n                <table>\n                <tr><th>Session</th><td><input class=\"validate[required] session\" radio type=radio name=session id=session value='AM' ";
 if ($sess == 'AM') {
     $b .= " checked=true";
예제 #4
0
파일: teach_stud.php 프로젝트: knichel/AIT
<?php

$new_account_title = " New Student Account";
$user_list_title = "Student Accounts";
$where_clause = "isStudent";
$selectWhat = "Student";
$userMode = "student";
// used to select fields for input
$usr_lev = 1;
$result = get_students_for_teacher($_SESSION[$_CONF['sess_name'] . '_myUID'], 'Y');
$values = array("first_name", "last_name");
$key = "user_id";
$ActiveUsers = make_array_from_mysql($result, $key, $values, " ");
$result = get_students_for_teacher($_SESSION[$_CONF['sess_name'] . '_myUID'], 'N');
$values = array("first_name", "last_name");
$key = "user_id";
$InactiveUsers = make_array_from_mysql($result, $key, $values, " ");
include 'admin_anyuser.php';
예제 #5
0
    //print $sql."<br>";
    $result = $db->query($sql);
    return $result;
}
function GetMonthString($n)
{
    $timestamp = mktime(0, 0, 0, $n, 1, 2005);
    return date("F", $timestamp);
}
if ($_SESSION[$_CONF['sess_name'] . '_isOffice'] || $_SESSION[$_CONF['sess_name'] . '_isGuidance']) {
    $termID = -1;
    if (isset($_POST['termID'])) {
        $termID = $_POST['termID'];
    }
    $terms = get_terms($_SESSION[$_CONF['sess_name'] . "_current_school_year"], $_SESSION[$_CONF['sess_name'] . "_myCenter"]);
    $termsList = make_array_from_mysql($terms, 'term_id', array('term_name'), '');
    $termsSelect = make_selection_list($termsList, $termID, 'termID', 'termForm', 'Term', 'on');
    $b = '';
    $b .= "\n        <center>\n        <form action=index.php?lev=" . $_SESSION[$_CONF['sess_name'] . '_lev'] . "&cat=" . $_SESSION[$_CONF['sess_name'] . '_cat'] . " method=post name=termForm>";
    $b .= $termsSelect;
    $b .= "\n        </center>";
    $t = "Perfect Attendance report";
    if ($termID != -1) {
        $report = array();
        $result = getCoursesForSMS($_SESSION[$_CONF['sess_name'] . "_myCenter"]);
        $centerCourses = make_assoc_array_from_sql($result, 'course_id', 'my');
        $unexcused = array("Unexcused-Abs", "Suspended", "WBL-Absent");
        $excused = array("Present", "Tardy", "Community Service", "Additional Work", "Home School Closed/Delayed", "Questar Closed/Delayed");
        $questionable = array("Excused-Abs");
        /**
         *Testing knichel course_id= 
예제 #6
0
 if (isset($_POST['session'])) {
     $sess = $_POST['session'];
 }
 $note = '';
 if (isset($_POST['attendNote'])) {
     $note = $_POST['attendNote'];
 }
 $min = '';
 if (isset($_POST['a_minutes'])) {
     $min = $_POST['a_minutes'];
 }
 $c = "blue";
 $t = "Single District Attendance";
 $b = "";
 $schools = get_schools_for_center($_SESSION[$_CONF['sess_name'] . "_myCenter"]);
 $schoolList = make_array_from_mysql($schools, 'school_id', array('school_name'), "");
 $allSchoolsForCenter = $schoolList;
 $schoolList['999'] = "-- ALL SCHOOLS --";
 $schoolSelect = make_selection_list($schoolList, $sid, 'school_id', 'attendForm', 'School', 'off');
 $schoolsForBulkAttend = array();
 if (isset($_POST['school_id'])) {
     if ($_POST['school_id'] == 999) {
         $schoolsForBulkAttend = $allSchoolsForCenter;
     } else {
         $schoolsForBulkAttend[$_POST['school_id']] = $schoolList[$_POST['school_id']];
     }
 }
 $attendVals = makeAttendPullDownList($av);
 /** get dates for date picker... */
 if (isset($_POST['setAttend'])) {
     $today = $_POST['dateSelector'];
예제 #7
0
<?php

// verify that the user is allowed here...
if ($_SESSION[$_CONF['sess_name'] . '_isAdmin'] || $_SESSION[$_CONF['sess_name'] . '_isOffice'] || $_SESSION[$_CONF['sess_name'] . '_isTeacher']) {
    /** Get the list of Ed Centers & Home Schools **/
    $centers = get_edCenters();
    $edCenters = make_array_from_mysql(get_edCenters(), 'center_id', array('short_name'), '');
    $homeSchools = get_homeSchools($_SESSION[$_CONF['sess_name'] . '_myCenter']);
    $edCentersList = make_selection_list($edCenters, -1, 'center_id', 'addToCenter', 'Center', 'off');
    $homeSchoolsList = make_selection_list($homeSchools, -1, 'school_id', 'addToSchool', 'School', 'off');
    $grade_level = 0;
    //default setting so I can use gradelevelrow for 2 areas...
    $main .= "\n\t\t<script language=\"javascript\" src=\"js/uname_search2.js\"></script>\n\t\t<script type=\"text/javascript\">\n\t\t\t\$(document).ready(function() {\n\t\t\t\t\$('#user_info').validationEngine({inlineValidation: true});\n\t\t\t\t\$('#user_pass').validationEngine();\n\t\t\t\t\$('input#showNewUser').click(\n\t\t\t\t\tfunction(e) {\n\t\t\t\t\t\t\$('div#newUserDialog').slideDown('slow');\n\t\t\t\t});\n\t\t\t\t\$('input#cancelNewUser').click(\n\t\t\t\t\tfunction(e) {\n                        \$.validationEngine.closePrompt(\".formError\",true);\n\t\t\t\t\t\t\$('div#newUserDialog').slideUp('slow');\n\t\t\t\t});\n\t\t\t\t\$('div#newUserDialog').hide();\n\n\t\t\t});\n\t\t</script>\n\t";
    $uid = -1;
    if (isset($_POST['u_id'])) {
        $uid = $_POST['u_id'];
    }
    if (isset($_POST['removeCenter'])) {
        /**
         * Next, if removing from center, then certainly need to deactivate/remove files from fs and db
         * If Updating, then need to check if any change to isTeacher or isStudent
         * deActivate_user($userMode,$_POST['u_id'],$_POST['c_id']);
         **/
        if ($userMode == 'teacher') {
            deActivate_teacher($_POST['u_id'], $_POST['c_id']);
        }
        if ($userMode == 'student') {
            deActivate_student($_POST['u_id'], $_POST['c_id']);
        }
        $sql = "DELETE from user2center where user_id=" . $_POST['u_id'] . " AND center_id=" . $_POST['c_id'];
        $result = $db->query($sql);