Разработка информационной системы управления учебным процессом (на примере филиала РГГУ г. Всеволжска)
Дипломная работа - Компьютеры, программирование
Другие дипломы по предмету Компьютеры, программирование
l_opt($id){
$ids=get_all_predm_id();($ids as $id){
$sql="SELECT `Name` FROM `predm` where `id`=$id";
$mysqli = new mysqli(HOST_DB, DB_USER, DB_PASS, DB_NAME);(mysqli_connect_errno()) {("Connect failed: %s\n", mysqli_connect_error());
} $mysqli->query('SET NAMES utf8');
$result = $mysqli->query($sql);( $row = $result->fetch_assoc() ){($row as $fieldValue){($id==$fieldValue)$x="disabled";"\n";
}
}
$result->close();
$mysqli->close();
};1;
}
get_name_group_ved($ved){
$sql="SELECT `id_predm` FROM `vedomosti_list` where `id`=$ved";
$predm=getinfo($sql);
$predm=$predm[0];
$sql="SELECT `Name` FROM `predm` WHERE `id`=$predm";
$name_predm=getinfo($sql);$name_predm[0];
}
get_all_lectors_opt($ved){
$sql="SELECT `id_predm` FROM `vedomosti_list` where `id`=$ved";
$predm=getinfo($sql);
$predm=$predm[0];
$sql="SELECT `id` FROM `lectures` WHERE `items_id` LIKE '%$predm%'"; $prep=getinfo($sql);($x=0; $x<count($prep); $x++){
$sql="SELECT `Surname`, `Name`, `Patronymic` FROM `lectures` WHERE `id`=".$prep[$x];
$name=getinfo($sql);
$name=$name[0]." ".$name[1]." ".$name[2];"\n";
}
1;
}
get_all_spec_sel(){
$ids=get_all_spec_id();"";($ids as $id){
$sql="SELECT `Name` FROM `spec` where `id`=$id";
$mysqli = new mysqli(HOST_DB, DB_USER, DB_PASS, DB_NAME);(mysqli_connect_errno()) {("Connect failed: %s\n", mysqli_connect_error());
}
$mysqli->query('SET NAMES utf8');
$result = $mysqli->query($sql);( $row = $result->fetch_assoc() ){($row as $fieldValue){"\n";
} }
$result->close();
$mysqli->close();
};1;
}
get_all_group_sel(){
$ids=get_all_group_id();
$count=count($ids);
($ids as $id){
$sql="SELECT `name`, `year`, `group_number` from `group` WHERE `id`=$id";
$mysqli = new mysqli(HOST_DB, DB_USER, DB_PASS, DB_NAME);
(mysqli_connect_errno()) {("Connect failed: %s\n", mysqli_connect_error());
}
$mysqli->query('SET NAMES utf8');
$result = $mysqli->query($sql);
($k=1; $k\n" ;
$id=""; $name="";$year=""; $group_number="";
};
};
};
$result->close();
$mysqli->close();
};1;
};
get_all_predm_sel(){
$ids=get_all_predm_id();"";($ids as $id){
$sql="SELECT `Name` FROM `predm` where `id`=$id";
$mysqli = new mysqli(HOST_DB, DB_USER, DB_PASS, DB_NAME);(mysqli_connect_errno()) {("Connect failed: %s\n", mysqli_connect_error());
}
$mysqli->query('SET NAMES utf8');
$result = $mysqli->query($sql);( $row = $result->fetch_assoc() ){($row as $fieldValue){"\n";
}
}
$result->close();
$mysqli->close();
};1;
}
get_all_predm_chk(){
$count= getinfo("SELECT count(`id`) from `predm`");
$count=$count[0];
$sql="SELECT `id`, `Name` from `predm`";
$mysqli = new mysqli(HOST_DB, DB_USER, DB_PASS, DB_NAME);
(mysqli_connect_errno()) {("Connect failed: %s\n", mysqli_connect_error());
}
$mysqli->query('SET NAMES utf8');
$result = $mysqli->query($sql);($k=1; $k" ;
$id=""; $Name="";
};
};
};
$result->close();
$mysqli->close();1;
};
get_all_stepen_sel(){
$ids=get_all_stepen_id();"";($ids as $id){
$sql="SELECT `Name` FROM `stepeni` where `id`=$id";
$mysqli = new mysqli(HOST_DB, DB_USER, DB_PASS, DB_NAME);(mysqli_connect_errno()) {("Connect failed: %s\n", mysqli_connect_error());
}
$mysqli->query('SET NAMES utf8');
$result = $mysqli->query($sql);
( $row = $result->fetch_assoc() ){($row as $fieldValue){"\n";
}
}
$result->close();
$mysqli->close();
};1;
}
add_student($surname, $name, $patronymic, $spec, $N_zach, $year, $number_group){
$sql="INSERT INTO `students`
( `id`,
`Surname`,
`Name`,
`Patronymic`,
`Specialty`,
`Entered`,
`group_id`,
`N_zach`)('',
'$surname',
'$name',
'$patronymic',
'$spec',
'$year',
'$number_group',
'$N_zach'
)";($sql);1;
}add_lectures($kaf,$surname, $name, $patronymic, $stepen, $items ){
$sql="INSERT INTO `lectures`
( `id`,
`Surname`,
`Name`,
`Patronymic`,
`Stepen_id`,
`Departmen_id`,
`items_id` )('',
'$surname',
'$name',
'$patronymic',
'$stepen',
'$kaf',
'$items'
)";($sql);
$_POST="";1;
}
add_department($name,$ZavDepartment){
$sql="INSERT INTO `Departments`
( `id`,
`Name`,
`ZavDepartment`)('',
'$name',
'$ZavDepartment'
)";($sql);
$_POST="";1;
}
add_groups($name,$year, $group_number){
$sql="INSERT INTO `group`
( `id`,
`name`,
`year`,
`group_number`)('',
'$name',
'$year',
'$group_number'
)";($sql);
$_POST="";1;
}
add_vedomosti($predm,$stud_id,$ocenka){
$sql="INSERT INTO `vedomosti`
( `id`,
`id_stud`,
`id_pred`,
`ocenka`)('',
'$stud_id',
'$predm',
'$ocenka'
)";($sql);
$_POST="";1;
}
add_spec($name){
$sql="INSERT INTO `spec`
( `id`,
`Name` )('',
'$name'
)";($sql);
$_POST="";1;
}add_predm($name){
$sql="INSERT INTO `predm`
( `id`,
`Name` )('',
'$name'
)";($sql);
$_POST="";1;
}
edit_department($id, $name,$group_number){
$sql= "UPDATE `rggu`.`group` SET `Name` = '$name', `year` = '$year', `group_number`='$group_number' WHERE `group`.`id` =$id";($sql);1;
};
edit_group($id, $name,$year, $group_number){
$sql= "UPDATE `rggu`.`group` SET `name` = '$name', `year` = '$year', `group_number`='$group_number' WHERE `group`.`id` =$id";($sql);1;
};edit_lectures($id, $kaf,$surname, $name, $patronymic, $stepen, $items )
{
$sql="UPDATE `rggu`.`lectures` SET
`Surname` = '$surname',
`Name` = '$name',
`Patronymic`='$patronymic',
`Stepen_id` ='$stepen',
`Departmen_id` ='$kaf',
`items_id`='$items'`lectures`.`id`=$id";($sql);1;
}
edit_student($id,$surname, $name, $patronymic, $spec, $N_zach, $year, $number_group)
{
$sql="UPDATE `rggu`.`students` SET
`Surname`='$surname',
`Name`='$name',
`Patronymic`='$patronymic',
`Specialty`='$spec',
`Entered`='$year',
`N_zach`='$N_zach',
`group_id`='$number_group'`students`.`id`=$id;";($sql);1;
}
edit_spec($id, $name)
{
$sql= "UPDATE `rggu`.`spec` SET `Name` = '$name' WHERE `spec`.`id` =$id";($sql);1;};
edit_predm($id, $name){
$sql= "UPDATE `rggu`.`predm` SET `Name` = '$name' WHERE `predm`.`id` =$id";($sql);1;
};
get_items_name($items){
$item_ar = explode ( "," , $items);($item_ar as $value){
$items_str.=", ".get_predm_name($value);
}
$items_str=substr($items_str,2,strlen($items_str)-2);$items_str;
}get_kaf_name($id){
$x=getinfo("SELECT `Name` from `Departments` WHERE `id`=$id");
$x=$x[0];$x;
}
get_kurse($id){
$x=getinfo("SELECT `Course` from `students` WHERE `id`=$id");
$x=$x[0];$x;
}get_entered($id){
$x=getinfo("SELECT `Entered` from `students` WHERE `id`=$id");
$x=$x[