Разработка информационной системы управления учебным процессом (на примере филиала РГТУ г. Всеволожска)

Дипломная работа - Компьютеры, программирование

Другие дипломы по предмету Компьютеры, программирование



t;>$value";

}

$result->close(); $mysqli->close();"";

}get_fio_student($id){

$sql="SELECT `Surname` FROM `students`";

$x=getinfo($sql);

$fio.=$x[0];

$sql="SELECT `Name` FROM `students`";

$x=getinfo($sql);

$fio.=' '.$x[0];

$sql="SELECT `Patronymic` FROM `students`";

$x=getinfo($sql);

$fio.=" ".$x[0];

return $fio;

}get_all_kaf_sel(){

$ids=get_all_kaf_id();

echo "";

foreach($ids as $id){

$sql="SELECT `Name` FROM `Departments` where `id`=$id";

$mysqli = new mysqli(HOST_DB, DB_USER, DB_PASS, DB_NAME);

if (mysqli_connect_errno()) {

printf("Connect failed: %s\n", mysqli_connect_error());

}

$mysqli->query('SET NAMES utf8');

$result = $mysqli->query($sql);

while( $row = $result->fetch_assoc() ){

foreach($row as $fieldValue){"\n";

}

}

$result->close();

$mysqli->close();

};

return 1;

}get_all_stud_sel(){

$ids=get_all_stud_id();

echo "";

foreach($ids as $id){

$sql="SELECT `Name` FROM `students` where `id`=$id";

$mysqli = new mysqli(HOST_DB, DB_USER, DB_PASS, DB_NAME);

if (mysqli_connect_errno()) {

printf("Connect failed: %s\n", mysqli_connect_error());

}

$mysqli->query('SET NAMES utf8');

$result = $mysqli->query($sql);

while( $row = $result->fetch_assoc() ){

foreach($row as $fieldValue){

echo "\n";

}

}

$result->close();

$mysqli->close();

}; return 1;

}get_all_spec_sel_opt($id){

$ids=get_all_spec_id();

foreach($ids as $id){

$sql="SELECT `Name` FROM `spec` where `id`=$id";

$mysqli = new mysqli(HOST_DB, DB_USER, DB_PASS, DB_NAME);

if (mysqli_connect_errno()) {

printf("Connect failed: %s\n", mysqli_connect_error());

}

$mysqli->query('SET NAMES utf8');

$result = $mysqli->query($sql);

while( $row = $result->fetch_assoc() ){

foreach($row as $fieldValue){

if($id==$fieldValue)$x="disabled";

echo "\n";

}

}

$result->close();

$mysqli->close();

};

return 1;

}get_all_kaf_sel_opt($id){

$ids=get_all_kaf_id();($ids as $id){

$sql="SELECT `Name` FROM `Departments` where `id`=$id";

$mysqli = new mysqli(HOST_DB, DB_USER, DB_PASS, DB_NAME);

if (mysqli_connect_errno()) {

printf("Connect failed: %s\n", mysqli_connect_error());

}

$mysqli->query('SET NAMES utf8');

$result = $mysqli->query($sql);

while( $row = $result->fetch_assoc() ){

foreach($row as $fieldValue){

if($id==$fieldValue)$x="disabled";

echo "\n";

}

}

$result->close();

$mysqli->close();

};

return 1;

}get_all_predm_sel_opt($id){

$ids=get_all_predm_id();

foreach($ids as $id){

$sql="SELECT `Name` FROM `predm` where `id`=$id";

$mysqli = new mysqli(HOST_DB, DB_USER, DB_PASS, DB_NAME);

if (mysqli_connect_errno()) {

printf("Connect failed: %s\n", mysqli_connect_error());

} $mysqli->query('SET NAMES utf8');

$result = $mysqli->query($sql);

while( $row = $result->fetch_assoc() ){

foreach($row as $fieldValue){

if($id==$fieldValue)$x="disabled";

echo "\n";

}

}

$result->close();

$mysqli->close();

};

return 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);

return $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];

echo "\n";

}

return 1;

}get_all_spec_sel(){

$ids=get_all_spec_id();

echo "";

foreach($ids as $id){

$sql="SELECT `Name` FROM `spec` where `id`=$id";

$mysqli = new mysqli(HOST_DB, DB_USER, DB_PASS, DB_NAME);

if (mysqli_connect_errno()) {

printf("Connect failed: %s\n", mysqli_connect_error());

}

$mysqli->query('SET NAMES utf8');

$result = $mysqli->query($sql);

while( $row = $result->fetch_assoc() ){

foreach($row as $fieldValue){

echo "\n";

} }

$result->close();

$mysqli->close();

};

return 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);

if (mysqli_connect_errno()) {

printf("Connect failed: %s\n", mysqli_connect_error());

}

$mysqli->query('SET NAMES utf8');

$result = $mysqli->query($sql);

for($k=1; $k<=$count; $k++){

foreach( $result->fetch_assoc() as $key => $value){

if($key=="id")$id=$value;

if($key=="name")$name=$value;

if($key=="year")$year=$value;

if($key=="group_number")$group_number=$value;(($id)&&($name)&&($year)&&($group_number)) {

echo "\n" ;

$id=""; $name="";$year=""; $group_number="";

};

};

};

$result->close();

$mysqli->close();

};

return 1;

};

get_all_predm_sel(){

$ids=get_all_predm_id();

echo "";

foreach($ids as $id){

$sql="SELECT `Name` FROM `predm` where `id`=$id";

$mysqli = new mysqli(HOST_DB, DB_USER, DB_PASS, DB_NAME);

if (mysqli_connect_errno()) {

printf("Connect failed: %s\n", mysqli_connect_error());

}

$mysqli->query('SET NAMES utf8');

$result = $mysqli->query($sql);

while( $row = $result->fetch_assoc() ){

foreach($row as $fieldValue){

echo "\n";

}

}

$result->close();

$mysqli->close();

};

return 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);

if (mysqli_connect_errno()) {

printf("Connect failed: %s\n", mysqli_connect_error());

}

$mysqli->query('SET NAMES utf8');

$result = $mysqli->query($sql);

for($k=1; $k<=$count; $k++){

foreach( $result->fetch_assoc() as $key => $value){

if($key=="id")$id=$value;

if($key=="Name")$Name=$value;

if(($id)&&($Name)) {

echo "" ;

$id=""; $Name="";

};

};

};

$result->close();

$mysqli->close();

return 1;

};get_all_stepen_sel(){

$ids=get_all_stepen_id();

echo "";

foreach($ids as $id){

$sql="SELECT `Name` FROM `stepeni` where `id`=$id";

$mysqli = new mysqli(HOST_DB, DB_USER, DB_PASS, DB_NAME);

if (mysqli_connect_errno()) {

printf("Connect failed: %s\n", mysqli_connect_error());

}

$mysqli->query('SET NAMES utf8');

$result = $mysqli->query($sql);

while( $row = $result->fetch_assoc() ){

foreach($row as $fieldValue){

echo "\n";

}