示例#1
0
/**
* 保存 font 列表
* @param string $data font 列表 数据
*/
function SaveFontList($saveFontListFile, $data = '')
{
    SaveData($saveFontListFile, $data . "\n", TRUE);
}
                            }
                            $cp_id = implode(',', $cp_id);
                            $sql = 'SELECT MAX(SCHOOL_DATE) AS SCHOOL_DATE FROM attendance_period WHERE STUDENT_ID=\'' . UserStudentID() . '\' AND COURSE_PERIOD_ID IN (' . $cp_id . ')';
                            $attendence = DBGet(DBQuery($sql));
                            $max_at_dt = $attendence[1]['SCHOOL_DATE'];
                            if (strtotime($_REQUEST['values'][$table][$id][$column]) >= strtotime($max_at_dt)) {
                                SaveData($iu_extra, '', $field_names);
                            } else {
                                echo "<p align='center'><b style='color:red'>Student cannot be dropped because student has got attendance till " . date('m-d-Y', strtotime($max_at_dt)) . "</b></p>";
                            }
                        } else {
                            $get_details = DBGet(DBQuery('SELECT max(START_DATE) AS START_DATE FROM student_enrollment WHERE STUDENT_ID=' . UserStudentID()));
                            if (strtotime($get_details[1]['START_DATE']) > strtotime($_REQUEST['values'][$table][$id][$column])) {
                                echo "<p align='center'><b style='color:red'>Student drop date cannot be before student enrollment date </b></p>";
                            } else {
                                SaveData($iu_extra, '', $field_names);
                            }
                        }
                    }
                } else {
                    echo "<p align='center'><b style='color:red'>Please enter proper drop date.Drop date must be greater than student enrollment date.</b></p>";
                }
            }
        }
    }
}
$functions = array('ENROLLMENT_CODE' => '_makeStartInputCodeenrl', 'DROP_CODE' => '_makeEndInputCodeenrl', 'SCHOOL_ID' => '_makeSchoolInput');
unset($THIS_RET);
$student_RET_qry = 'SELECT e.SYEAR, s.FIRST_NAME,s.LAST_NAME,s.GENDER, e.ID,e.GRADE_ID,e.ENROLLMENT_CODE,e.START_DATE,e.DROP_CODE,e.END_DATE,e.END_DATE AS END,e.SCHOOL_ID,e.NEXT_SCHOOL,e.CALENDAR_ID FROM student_enrollment e,students s WHERE e.STUDENT_ID=\'' . UserStudentID() . '\' AND e.SYEAR=\'' . UserSyear() . '\' AND e.STUDENT_ID=s.STUDENT_ID ORDER BY e.START_DATE';
$RET = DBGet(DBQuery($student_RET_qry));
$not_add = false;
示例#3
0
         $sql .= '(' . substr($fields, 0, -1) . ') values(' . substr($values, 0, -1) . ')';
         DBQuery($sql);
         if ($CentreModules['Food_Service']) {
             // create default food service account for this student
             $sql = "INSERT INTO FOOD_SERVICE_ACCOUNTS (ACCOUNT_ID,BALANCE,TRANSACTION_ID) values('{$student_id}','0.00','0')";
             DBQuery($sql);
             // associate with default food service account and assign other defaults
             $sql = "INSERT INTO FOOD_SERVICE_STUDENT_ACCOUNTS (STUDENT_ID,DISCOUNT,BARCODE,ACCOUNT_ID) values('{$student_id}','','','{$student_id}')";
             DBQuery($sql);
         }
         $_SESSION['student_id'] = $_REQUEST['student_id'] = $student_id;
         $new_student = true;
     }
 }
 if ($_REQUEST['values'] && $_REQUEST['include'] == 'Medical') {
     SaveData(array('STUDENT_MEDICAL_ALERTS' => "ID='__ID__'", 'STUDENT_MEDICAL' => "ID='__ID__'", 'STUDENT_MEDICAL_VISITS' => "ID='__ID__'", 'fields' => array('STUDENT_MEDICAL' => 'ID,STUDENT_ID,', 'STUDENT_MEDICAL_ALERTS' => 'ID,STUDENT_ID,', 'STUDENT_MEDICAL_VISITS' => 'ID,STUDENT_ID,'), 'values' => array('STUDENT_MEDICAL' => db_seq_nextval('STUDENT_MEDICAL_SEQ') . ",'" . UserStudentID() . "',", 'STUDENT_MEDICAL_ALERTS' => db_seq_nextval('STUDENT_MEDICAL_ALERTS_SEQ') . ",'" . UserStudentID() . "',", 'STUDENT_MEDICAL_VISITS' => db_seq_nextval('STUDENT_MEDICAL_VISITS_SEQ') . ",'" . UserStudentID() . "',")));
 }
 if ($_REQUEST['include'] != 'General_Info' && $_REQUEST['include'] != 'Address' && $_REQUEST['include'] != 'Medical' && $_REQUEST['include'] != 'Other_Info') {
     if (!strpos($_REQUEST['include'], '/')) {
         include 'modules/Students/includes/' . $_REQUEST['include'] . '.inc.php';
     } else {
         include 'modules/' . $_REQUEST['include'] . '.inc.php';
     }
 }
 unset($_REQUEST['modfunc']);
 // SHOULD THIS BE HERE???
 if (!UserStudentID()) {
     unset($_REQUEST['values']);
 }
 unset($_SESSION['_REQUEST_vars']['modfunc']);
 unset($_SESSION['_REQUEST_vars']['values']);
                            }
                            $data["films"][$_REQUEST["film"]]["name"] = $_REQUEST["film_name"];
                            $data["films"][$_REQUEST["film"]]["originalname"] = $_REQUEST["film_originalname"];
                            $data["films"][$_REQUEST["film"]]["image"] = $film_image;
                            $data["films"][$_REQUEST["film"]]["trailer"] = $film_trailer;
                            $data["films"][$_REQUEST["film"]]["trailer_label"] = $_REQUEST["film_trailer_label"];
                            $data["films"][$_REQUEST["film"]]["infourl"] = $_REQUEST["film_infourl"];
                            $data["films"][$_REQUEST["film"]]["hit"] = $_REQUEST["hit"];
                            $data["films"][$_REQUEST["film"]]["visible"] = isset($_REQUEST["film_visible"]) ? 1 : 0;
                        }
                        break;
                }
                break;
            default:
        }
        SaveData();
    } else {
        echo "Логин или пароль не совпадают";
    }
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>Редактор анонсов</title>
<style>
*{
	font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 8pt;
}
示例#5
0
                 if ($un_chl_res != 'exist' && $pass_chl_res == 'exist') {
                     echo "<font color=red><b>Password already exist. Please try with a different password.</b></font>";
                 }
                 if ($un_chl_res == 'exist' && $pass_chl_res == 'exist') {
                     echo "<font color=red><b>Username and password  already exist. Please try with a different user name and password.</b></font>";
                 }
             }
         }
         $new_student = true;
     }
 }
 if ($_REQUEST['values'] && $_REQUEST['include'] == 'MedicalInc') {
     SaveData(array('student_medical_notes' => "ID='__ID__'", 'student_medical_alerts' => "ID='__ID__'", 'student_immunization' => "ID='__ID__'", 'student_medical_visits' => "ID='__ID__'", 'fields' => array('student_medical_notes' => 'STUDENT_ID,', 'student_immunization' => 'STUDENT_ID,', 'student_medical_alerts' => 'STUDENT_ID,', 'student_medical_visits' => 'STUDENT_ID,'), 'values' => array('student_medical_notes' => "'" . UserStudentID() . "',", 'student_immunization' => "'" . UserStudentID() . "',", 'student_medical_alerts' => "'" . UserStudentID() . "',", 'student_medical_visits' => "'" . UserStudentID() . "',")));
 }
 if ($_REQUEST['values'] && $_REQUEST['include'] == 'CommentsInc') {
     SaveData(array('student_mp_comments' => "ID='__ID__'", 'fields' => array('student_mp_comments' => 'STUDENT_ID,SYEAR,MARKING_PERIOD_ID,STAFF_ID,'), 'values' => array('student_mp_comments' => "'" . UserStudentID() . "','" . UserSyear() . "','" . UserMP() . "','" . User('STAFF_ID') . "',")));
 }
 if ($_REQUEST['include'] != 'GeneralInfoInc' && $_REQUEST['include'] != 'AddressInc' && $_REQUEST['include'] != 'MedicalInc' && $_REQUEST['include'] != 'GoalInc' && $_REQUEST['include'] != 'OtherInfoInc' && $_REQUEST['include'] != 'EnrollmentInfoInc' && $_REQUEST['include'] != 'FilesInc') {
     if (!strpos($_REQUEST['include'], '/')) {
         include 'modules/students/includes/' . $_REQUEST['include'] . '.php';
     } else {
         include 'modules/' . $_REQUEST['include'] . '.php';
     }
 }
 unset($_REQUEST['modfunc']);
 // SHOULD THIS BE HERE???
 if (!UserStudentID()) {
     unset($_REQUEST['values']);
 }
 unset($_SESSION['_REQUEST_vars']['modfunc']);
 unset($_SESSION['_REQUEST_vars']['values']);
示例#6
0
<?php

$semester_comments = 0;
//$_CENTRE['allow_edit'] = true;
if ($_REQUEST['modfunc'] == 'update') {
    $existing_RET = DBGet(DBQuery("SELECT STUDENT_ID FROM STUDENT_MP_COMMENTS WHERE STUDENT_ID='" . UserStudentID() . "' AND SYEAR='" . UserSyear() . "' AND MARKING_PERIOD_ID='" . ($semester_comments ? GetParentMP('SEM', UserMP()) : UserMP()) . "'"));
    if (!$existing_RET) {
        DBQuery("INSERT INTO STUDENT_MP_COMMENTS (SYEAR,STUDENT_ID,MARKING_PERIOD_ID) values('" . UserSyear() . "','" . UserStudentID() . "','" . ($semester_comments ? GetParentMP('SEM', UserMP()) : UserMP()) . "')");
    }
    SaveData(array('STUDENT_MP_COMMENTS' => "STUDENT_ID='" . UserStudentID() . "' AND SYEAR='" . UserSyear() . "' AND MARKING_PERIOD_ID='" . ($semester_comments ? GetParentMP('SEM', UserMP()) : UserMP()) . "'"), '', array('COMMENT' => _('Comment')));
    //unset($_SESSION['_REQUEST_vars']['modfunc']);
    //unset($_SESSION['_REQUEST_vars']['values']);
}
if (!$_REQUEST['modfunc']) {
    $comments_RET = DBGet(DBQuery("SELECT COMMENT FROM STUDENT_MP_COMMENTS WHERE STUDENT_ID='" . UserStudentID() . "' AND SYEAR='" . UserSyear() . "' AND MARKING_PERIOD_ID='" . ($semester_comments ? GetParentMP('SEM', UserMP()) : UserMP()) . "'"));
    echo '<TABLE>';
    echo '<TR>';
    echo '<TD valign=bottom>';
    echo '<b>' . $mp['TITLE'] . ' ' . _('Comments') . '</b><BR>';
    echo '<TEXTAREA id=textarea name=values[STUDENT_MP_COMMENTS][' . UserStudentID() . '][COMMENT] cols=66 rows=22' . (AllowEdit() ? '' : ' readonly') . ' onkeypress="document.getElementById(\'chars_left\').innerHTML=(1121-this.value.length); if(this.value.length>1121) {document.getElementById(\'chars_left\').innerHTML=\'' . _('Fewer than 0') . '\'}">';
    echo $comments_RET[1]['COMMENT'];
    echo '</TEXTAREA>';
    echo '<table><tr><td><IMG SRC=assets/comment_button.gif onload="document.getElementById(\'chars_left\').innerHTML=1121-document.getElementById(\'textarea\').value.length";></td><td><small><div id=chars_left>1121</div></small></td><td><small>' . _('characters remaining.') . '<small></td></tr></table>';
    echo '</TD>';
    //echo '<TR><TD align=center><INPUT type=submit value=Save></TD></TR>';
    echo '</TR></TABLE>';
    echo "<br><b>* " . Localize('colon', _('If more than one teacher will be adding comments for this student')) . "</b><br>";
    echo "<ul><li>" . _('Type your name above the comments you enter.') . "</li>";
    echo "<li>" . _('Leave space for other teachers to enter their comments.') . "</li></ul>";
    $_REQUEST['category_id'] = '4';
    $separator = '<hr>';
示例#7
0
<?php

//modif Francois: add School Configuration
$program_config = DBGet(DBQuery("SELECT * FROM PROGRAM_CONFIG WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "' AND PROGRAM='students'"), array(), array('TITLE'));
//$_ROSARIO['allow_edit'] = true;
if ($_REQUEST['modfunc'] == 'update') {
    $existing_RET = DBGet(DBQuery("SELECT STUDENT_ID FROM STUDENT_MP_COMMENTS WHERE STUDENT_ID='" . UserStudentID() . "' AND SYEAR='" . UserSyear() . "' AND MARKING_PERIOD_ID='" . ($program_config['STUDENTS_SEMESTER_COMMENTS'][1]['VALUE'] ? GetParentMP('SEM', UserMP()) : UserMP()) . "'"));
    if (!$existing_RET) {
        DBQuery("INSERT INTO STUDENT_MP_COMMENTS (SYEAR,STUDENT_ID,MARKING_PERIOD_ID) values('" . UserSyear() . "','" . UserStudentID() . "','" . ($program_config['STUDENTS_SEMESTER_COMMENTS'][1]['VALUE'] ? GetParentMP('SEM', UserMP()) : UserMP()) . "')");
    }
    SaveData(array('STUDENT_MP_COMMENTS' => "STUDENT_ID='" . UserStudentID() . "' AND SYEAR='" . UserSyear() . "' AND MARKING_PERIOD_ID='" . ($program_config['STUDENTS_SEMESTER_COMMENTS'][1]['VALUE'] ? GetParentMP('SEM', UserMP()) : UserMP()) . "'"), '', array('COMMENT' => _('Comment')));
    //unset($_SESSION['_REQUEST_vars']['modfunc']);
    //unset($_SESSION['_REQUEST_vars']['values']);
}
if (empty($_REQUEST['modfunc'])) {
    $comments_RET = DBGet(DBQuery("SELECT COMMENT FROM STUDENT_MP_COMMENTS WHERE STUDENT_ID='" . UserStudentID() . "' AND SYEAR='" . UserSyear() . "' AND MARKING_PERIOD_ID='" . ($program_config['STUDENTS_SEMESTER_COMMENTS'][1]['VALUE'] ? GetParentMP('SEM', UserMP()) : UserMP()) . "'"));
    echo '<TABLE>';
    echo '<TR>';
    echo '<TD style="vertical-align:bottom;">';
    echo '<b>' . $mp['TITLE'] . ' ' . _('Comments') . '</b><BR />';
    //modif Francois: remove maxlength limitation as it is not technically needed
    echo '<TEXTAREA id="textarea" name="values[STUDENT_MP_COMMENTS][' . UserStudentID() . '][COMMENT]" cols="66" rows="27"' . (AllowEdit() ? '' : ' readonly') . '>';
    echo $comments_RET[1]['COMMENT'];
    echo '</TEXTAREA>';
    echo '</TD>';
    echo '</TR></TABLE>';
    echo '<BR /><b>* ' . Localize('colon', _('If more than one teacher will be adding comments for this student')) . '</b><BR />';
    echo '<ul><li>' . _('Type your name above the comments you enter.') . '</li></ul>';
    //echo '<li>'._('Leave space for other teachers to enter their comments.').'</li></ul>';
    $_REQUEST['category_id'] = '4';
    $separator = '<hr>';