Пример #1
0
     $row = $result->fetch_assoc();
     $file_path = makeSQLsafe($row['file_path']);
     $file_name = makeSQLsafe($row['file_name']);
     $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'];
Пример #2
0
<?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';
Пример #3
0
<?php

if ($_SESSION[$_CONF['sess_name'] . '_isTeacher']) {
    $fname = $_SESSION[$_CONF['sess_name'] . '_myfName'];
    $lname = $_SESSION[$_CONF['sess_name'] . '_mylName'];
    $tid = $_SESSION[$_CONF['sess_name'] . '_myUID'];
    $result = get_students_for_teacher($tid, 'B');
    // get active && inactive
    $values = array("first_name", "last_name");
    $key = "user_id";
    $los = make_array_from_mysql($result, $key, $values, " ");
    $sid = -1;
    if (isset($_SESSION[$_CONF['sess_name'] . '_selected_student'])) {
        $sid = $_SESSION[$_CONF['sess_name'] . '_selected_student'];
        if (!array_key_exists($sid, $los)) {
            $sid = -1;
        }
    }
    $t = "Multi-Class Progress Reports";
    $b = "";
    $b .= "<center><FORM action=index.php?lev=" . $_SESSION[$_CONF['sess_name'] . '_lev'] . "&cat=" . $_SESSION[$_CONF['sess_name'] . '_cat'] . " method=POST name=students>" . make_selection_list($los, $sid, 'student_id', 'students', 'Student', 'on') . "\n\t\t\t</form></center>";
    $main .= make_box($t, $b);
    if ($sid != -1) {
        $classes = get_classes_for_student($sid, $tid);
        $cid = make_assoc_array_from_sql($classes, "class_id", "my");
        //include('multiClassProgress_report.php');
        include 'classSummary.php';
        $report = $b;
        //.$print_button;
        $main .= make_box($t, $report);
    }
Пример #4
0
include '/usr/local/q3ait/config.php';
include 'functionLib.php';
$db = mysql_connect($_CONF['DB_host'], $_CONF['DB_user'], $_CONF['DB_pass']);
mysql_select_db($_CONF['DB_name'], $db);
ini_set("session.gc_maxlifetime", "3600");
session_save_path("/usr/local/q3ait/_SESSIONS");
session_name($_CONF['sess_name']);
session_start();
$loginError = check_auth($_SESSION[$_CONF['sess_name'] . '_username'], $_SESSION[$_CONF['sess_name'] . '_password']);
if (!$loginError['error_value']) {
    $fname = $_SESSION[$_CONF['sess_name'] . '_myfName'];
    $lname = $_SESSION[$_CONF['sess_name'] . '_mylName'];
    $tid = $_SESSION[$_CONF['sess_name'] . '_myUID'];
    $sid = $_SESSION[$_CONF['sess_name'] . '_selected_student'];
    $cid = $_SESSION[$_CONF['sess_name'] . '_selected_class'];
    $los = get_students_for_teacher($tid);
    $studentName = $los[$sid];
    list($studentFirstName, $studentLastName) = split(" ", $studentName);
    $sql = "SELECT class.class_name, term.term_name, user.first_name, user.last_name\n            FROM class, term, user\n            WHERE class.class_id=" . $cid . " AND term.term_id=class.term_id\n            AND user.user_id=term.teacher_id";
    $result = mysql_query($sql);
    $row = mysql_fetch_assoc($result);
    $className = $row['class_name'];
    $termName = $row['term_name'];
    $teacherName = $row['first_name'] . " " . $row['last_name'];
    $currentDate = date("F j, Y", time() - 18000);
    $classInfo = $className . "Ln()" . "~" . $teacherName . "-" . $termName . "~" . $currentDate;
    /** Get the list of categories for this class **/
    $cat_names_array = array();
    /** holds the names of the categories for this class **/
    $info = array();
    /** used to hold grade info like category weight and grade **/