Смекни!
smekni.com

Звіт про проходження практики за спеціальністю інженер комп ютерних систем (стр. 5 из 6)

for ($q=0;$q<=29;$q++)

$temp_rec[$q] = $temp_record_ST[$q];

$temp_rec[12] = $temp_record_ST[12] + $temp_record[6];

dbase_replace_record ($bd_ST, $temp_rec, $e);

break;

}

}

}

//Внесення даних по ВЗ

for ($i=1; $i<=$records_counter; $i++) {

$temp_record = dbase_get_record ($bd_12, $i);

$records_counter_ST = dbase_numrecords($bd_ST);

for ($e=1; $e<=$records_counter_ST; $e++) {

$temp_record_ST = dbase_get_record ($bd_ST, $e);

if ($temp_record[0] == $temp_record_ST[0]) {

for ($q=0;$q<=29;$q++)

$temp_rec[$q] = $temp_record_ST[$q];

$temp_rec[13] = $temp_record_ST[13] + $temp_record[6];

dbase_replace_record ($bd_ST, $temp_rec, $e);

break;

}

}

}

//Внесення даних по ВЗ

for ($i=1; $i<=$records_counter; $i++) {

$temp_record = dbase_get_record ($bd_13, $i);

$records_counter_ST = dbase_numrecords($bd_ST);

for ($e=1; $e<=$records_counter_ST; $e++) {

$temp_record_ST = dbase_get_record ($bd_ST, $e);

if ($temp_record[0] == $temp_record_ST[0]) {

for ($q=0;$q<=29;$q++)

$temp_rec[$q] = $temp_record_ST[$q];

$temp_rec[14] = $temp_record_ST[14] + $temp_record[6];

dbase_replace_record ($bd_ST, $temp_rec, $e);

break;

}

}

}

//Внесення даних по ВЗ

for ($i=1; $i<=$records_counter; $i++) {

$temp_record = dbase_get_record ($bd_14, $i);

$records_counter_ST = dbase_numrecords($bd_ST);

for ($e=1; $e<=$records_counter_ST; $e++) {

$temp_record_ST = dbase_get_record ($bd_ST, $e);

if ($temp_record[0] == $temp_record_ST[0]) {

for ($q=0;$q<=29;$q++)

$temp_rec[$q] = $temp_record_ST[$q];

$temp_rec[15] = $temp_record_ST[15] + $temp_record[6];

dbase_replace_record ($bd_ST, $temp_rec, $e);

break;

}

}

}

//Внесення даних по ВЗ

for ($i=1; $i<=$records_counter; $i++) {

$temp_record = dbase_get_record ($bd_15, $i);

$records_counter_ST = dbase_numrecords($bd_ST);

for ($e=1; $e<=$records_counter_ST; $e++) {

$temp_record_ST = dbase_get_record ($bd_ST, $e);

if ($temp_record[0] == $temp_record_ST[0]) {

for ($q=0;$q<=29;$q++)

$temp_rec[$q] = $temp_record_ST[$q];

$temp_rec[16] = $temp_record_ST[16] + $temp_record[6];

dbase_replace_record ($bd_ST, $temp_rec, $e);

break;

}

}

}

//Внесення даних по ВЗ

for ($i=1; $i<=$records_counter; $i++) {

$temp_record = dbase_get_record ($bd_16, $i);

$records_counter_ST = dbase_numrecords($bd_ST);

for ($e=1; $e<=$records_counter_ST; $e++) {

$temp_record_ST = dbase_get_record ($bd_ST, $e);

if ($temp_record[0] == $temp_record_ST[0]) {

for ($q=0;$q<=29;$q++)

$temp_rec[$q] = $temp_record_ST[$q];

$temp_rec[17] = $temp_record_ST[17] + $temp_record[6];

dbase_replace_record ($bd_ST, $temp_rec, $e);

break;

}

}

}

//Внесення даних по ВЗ

for ($i=1; $i<=$records_counter; $i++) {

$temp_record = dbase_get_record ($bd_17, $i);

$records_counter_ST = dbase_numrecords($bd_ST);

for ($e=1; $e<=$records_counter_ST; $e++) {

$temp_record_ST = dbase_get_record ($bd_ST, $e);

if ($temp_record[0] == $temp_record_ST[0]) {

for ($q=0;$q<=29;$q++)

$temp_rec[$q] = $temp_record_ST[$q];

$temp_rec[18] = $temp_record_ST[18] + $temp_record[6];

dbase_replace_record ($bd_ST, $temp_rec, $e);

break;

}

}

}

//Внесення даних по ВЗ

for ($i=1; $i<=$records_counter; $i++) {

$temp_record = dbase_get_record ($bd_18, $i);

$records_counter_ST = dbase_numrecords($bd_ST);

for ($e=1; $e<=$records_counter_ST; $e++) {

$temp_record_ST = dbase_get_record ($bd_ST, $e);

if ($temp_record[0] == $temp_record_ST[0]) {

for ($q=0;$q<=29;$q++)

$temp_rec[$q] = $temp_record_ST[$q];

$temp_rec[19] = $temp_record_ST[19] + $temp_record[6];

dbase_replace_record ($bd_ST, $temp_rec, $e);

break;

}

}

}

//Внесення даних по ВЗ

for ($i=1; $i<=$records_counter; $i++) {

$temp_record = dbase_get_record ($bd_19, $i);

$records_counter_ST = dbase_numrecords($bd_ST);

for ($e=1; $e<=$records_counter_ST; $e++) {

$temp_record_ST = dbase_get_record ($bd_ST, $e);

if ($temp_record[0] == $temp_record_ST[0]) {

for ($q=0;$q<=29;$q++)

$temp_rec[$q] = $temp_record_ST[$q];

$temp_rec[20] = $temp_record_ST[20] + $temp_record[6];

dbase_replace_record ($bd_ST, $temp_rec, $e);

break;

}

}

}

//Внесення даних по ВЗ

for ($i=1; $i<=$records_counter; $i++) {

$temp_record = dbase_get_record ($bd_20, $i);

$records_counter_ST = dbase_numrecords($bd_ST);

for ($e=1; $e<=$records_counter_ST; $e++) {

$temp_record_ST = dbase_get_record ($bd_ST, $e);

if ($temp_record[0] == $temp_record_ST[0]) {

for ($q=0;$q<=29;$q++)

$temp_rec[$q] = $temp_record_ST[$q];

$temp_rec[21] = $temp_record_ST[21] + $temp_record[6];

dbase_replace_record ($bd_ST, $temp_rec, $e);

break;

}

}

}

//Внесення даних по ВЗ

for ($i=1; $i<=$records_counter; $i++) {

$temp_record = dbase_get_record ($bd_21, $i);

$records_counter_ST = dbase_numrecords($bd_ST);

for ($e=1; $e<=$records_counter_ST; $e++) {

$temp_record_ST = dbase_get_record ($bd_ST, $e);

if ($temp_record[0] == $temp_record_ST[0]) {

for ($q=0;$q<=29;$q++)

$temp_rec[$q] = $temp_record_ST[$q];

$temp_rec[22] = $temp_record_ST[22] + $temp_record[6];

dbase_replace_record ($bd_ST, $temp_rec, $e);

break;

}

}

}

//Внесення даних по ВЗ

for ($i=1; $i<=$records_counter; $i++) {

$temp_record = dbase_get_record ($bd_22, $i);

$records_counter_ST = dbase_numrecords($bd_ST);

for ($e=1; $e<=$records_counter_ST; $e++) {

$temp_record_ST = dbase_get_record ($bd_ST, $e);

if ($temp_record[0] == $temp_record_ST[0]) {

for ($q=0;$q<=29;$q++)

$temp_rec[$q] = $temp_record_ST[$q];

$temp_rec[23] = $temp_record_ST[23] + $temp_record[6];

dbase_replace_record ($bd_ST, $temp_rec, $e);

break;

}

}

}

//Внесення даних по ВЗ

for ($i=1; $i<=$records_counter; $i++) {

$temp_record = dbase_get_record ($bd_23, $i);

$records_counter_ST = dbase_numrecords($bd_ST);

for ($e=1; $e<=$records_counter_ST; $e++) {

$temp_record_ST = dbase_get_record ($bd_ST, $e);

if ($temp_record[0] == $temp_record_ST[0]) {

for ($q=0;$q<=29;$q++)

$temp_rec[$q] = $temp_record_ST[$q];

$temp_rec[24] = $temp_record_ST[24] + $temp_record[6];

dbase_replace_record ($bd_ST, $temp_rec, $e);

break;

}

}

}

//Внесення даних по ВЗ

for ($i=1; $i<=$records_counter; $i++) {

$temp_record = dbase_get_record ($bd_24, $i);

$records_counter_ST = dbase_numrecords($bd_ST);

for ($e=1; $e<=$records_counter_ST; $e++) {

$temp_record_ST = dbase_get_record ($bd_ST, $e);

if ($temp_record[0] == $temp_record_ST[0]) {

for ($q=0;$q<=29;$q++)

$temp_rec[$q] = $temp_record_ST[$q];

$temp_rec[25] = $temp_record_ST[25] + $temp_record[6];

dbase_replace_record ($bd_ST, $temp_rec, $e);

break;

}

}

}

//Внесення даних по ВЗ

for ($i=1; $i<=$records_counter; $i++) {

$temp_record = dbase_get_record ($bd_25, $i);

$records_counter_ST = dbase_numrecords($bd_ST);

for ($e=1; $e<=$records_counter_ST; $e++) {

$temp_record_ST = dbase_get_record ($bd_ST, $e);

if ($temp_record[0] == $temp_record_ST[0]) {

for ($q=0;$q<=29;$q++)

$temp_rec[$q] = $temp_record_ST[$q];

$temp_rec[26] = $temp_record_ST[26] + $temp_record[6];

dbase_replace_record ($bd_ST, $temp_rec, $e);

break;

}

}

}

//Внесення даних по ВЗ

for ($i=1; $i<=$records_counter; $i++) {

$temp_record = dbase_get_record ($bd_26, $i);

$records_counter_ST = dbase_numrecords($bd_ST);

for ($e=1; $e<=$records_counter_ST; $e++) {

$temp_record_ST = dbase_get_record ($bd_ST, $e);

if ($temp_record[0] == $temp_record_ST[0]) {

for ($q=0;$q<=29;$q++)

$temp_rec[$q] = $temp_record_ST[$q];

$temp_rec[27] = $temp_record_ST[27] + $temp_record[6];

dbase_replace_record ($bd_ST, $temp_rec, $e);

break;

}

}

}

//Внесення даних по ВЗ

for ($i=1; $i<=$records_counter; $i++) {

$temp_record = dbase_get_record ($bd_27, $i);

$records_counter_ST = dbase_numrecords($bd_ST);

for ($e=1; $e<=$records_counter_ST; $e++) {

$temp_record_ST = dbase_get_record ($bd_ST, $e);

if ($temp_record[0] == $temp_record_ST[0]) {

for ($q=0;$q<=29;$q++)

$temp_rec[$q] = $temp_record_ST[$q];

$temp_rec[28] = $temp_record_ST[28] + $temp_record[6];

dbase_replace_record ($bd_ST, $temp_rec, $e);

break;

}

}

}

//Внесення даних по ВЗ Золочів

$records_counter = dbase_numrecords($bd_Zl);

for ($i=1; $i<=$records_counter; $i++) {

$temp_record = dbase_get_record ($bd_Zl, $i);

$records_counter_ST = dbase_numrecords($bd_ST);

for ($e=1; $e<=$records_counter_ST; $e++) {

$temp_record_ST = dbase_get_record ($bd_ST, $e);

if ($temp_record[0] == $temp_record_ST[0]) {

$temp_rec[0] = $temp_record_ST[0];

$temp_rec[1] = $temp_record_ST[1];

for ($q=2;$q<29;$q++)

$temp_rec[$q] = $temp_record_ST[$q];

$temp_rec[29] = $temp_record_ST[29] + $temp_record[6];

dbase_replace_record ($bd_ST, $temp_rec, $e);

break;

}

}

}

dbase_close ($bd_1);

dbase_close ($bd_2);

dbase_close ($bd_3);

dbase_close ($bd_4);

dbase_close ($bd_5);

dbase_close ($bd_6);

dbase_close ($bd_7);

dbase_close ($bd_8);

dbase_close ($bd_9);

dbase_close ($bd_10);

dbase_close ($bd_11);

dbase_close ($bd_12);

dbase_close ($bd_13);

dbase_close ($bd_14);

dbase_close ($bd_15);

dbase_close ($bd_16);

dbase_close ($bd_17);

dbase_close ($bd_18);

dbase_close ($bd_19);

dbase_close ($bd_20);

dbase_close ($bd_21);

dbase_close ($bd_22);

dbase_close ($bd_23);

dbase_close ($bd_24);

dbase_close ($bd_25);

dbase_close ($bd_26);

dbase_close ($bd_27);

dbase_close ($bd_Zl);

dbase_close ($bd_ST);

?>


Додаток 4. Скріпт виводу сортувальної таблиці для друку.

<?php

$bd = dbase_open ("C:&bsol;Apache2&bsol;htdocs&bsol;BD&bsol;2004_04_ST.DBF", 0);

$rec_counter = dbase_numrecords ($bd);

echo "<TABLE BORDER>

";

echo "<TR><TD>Індекс</TD><TD>Назва видання</TD><TD>Б.К</TD><TD>Біб</TD><TD>Бор</TD><TD>В.В</TD><TD>Вор</TD><TD>Глн</TD><TD>Гол</TD><TD>Гонч</TD><TD>Єл</TD><TD>Жук</TD><TD>Заст</TD><TD>Кур</TD><TD>Кол</TD><TD>Нов</TD><TD>Підг</TD><TD>Плг</TD><TD>Пом</TD><TD>Пол</TD><TD>Поч</TD><TD>Ремз</TD><TD>Сас</TD><TD>Скв</TD><TD>Слв</TD><TD>Снв</TD><TD>Стр</TD><TD>Чер</TD><TD>Ясн</TD><TD>Зол</TD></TR>";

for ($i=1; $i<=$rec_counter; $i++) {

// if ($i==100) break;

$temp_record2 = dbase_get_record ($bd, $i);

if ($temp_record2[2] != 0) {

echo "<TR><TD><CENTER>$temp_record2[0]</CENTER></TD>";

echo "<TD>$temp_record2[1]</TD>";

for ($t=2; $t<29; $t++)

if ($temp_record2[$t] == 0)

echo "<TD><CENTER>&#160</CENTER></TD>";

else

echo "<TD><CENTER>$temp_record2[$t]</CENTER></TD>";

echo "<TD><CENTER>$temp_record2[29]</CENTER></TD></TR>";}

else

if ($temp_record2[3] != 0){

echo "<TR><TD><CENTER>$temp_record2[0]</CENTER></TD>";

for ($t=1; $t<29; $t++)

echo "<TD><CENTER>$temp_record2[$t]</CENTER></TD>";

echo "<TD><CENTER>$temp_record2[29]</CENTER></TD></TR>";}

else

if ($temp_record2[4] != 0){

echo "<TR><TD><CENTER>$temp_record2[0]</CENTER></TD>";

for ($t=1; $t<29; $t++)

echo "<TD><CENTER>$temp_record2[$t]</CENTER></TD>";

echo "<TD><CENTER>$temp_record2[29]</CENTER></TD></TR>";}

else

if ($temp_record2[5] != 0){

echo "<TR><TD><CENTER>$temp_record2[0]</CENTER></TD>";

for ($t=1; $t<29; $t++)

echo "<TD><CENTER>$temp_record2[$t]</CENTER></TD>";

echo "<TD><CENTER>$temp_record2[29]</CENTER></TD></TR>";}

else

if ($temp_record2[6] != 0) {

echo "<TR><TD><CENTER>$temp_record2[0]</CENTER></TD>";

for ($t=1; $t<29; $t++)

echo "<TD><CENTER>$temp_record2[$t]</CENTER></TD>";

echo "<TD><CENTER>$temp_record2[29]</CENTER></TD></TR>";}

else

if ($temp_record2[7] != 0) {

echo "<TR><TD><CENTER>$temp_record2[0]</CENTER></TD>";

for ($t=1; $t<29; $t++)

echo "<TD><CENTER>$temp_record2[$t]</CENTER></TD>";

echo "<TD><CENTER>$temp_record2[28]</CENTER></TD></TR>";}

else

if ($temp_record2[8] != 0) {

echo "<TR><TD><CENTER>$temp_record2[0]</CENTER></TD>";

for ($t=1; $t<29; $t++)

echo "<TD><CENTER>$temp_record2[$t]</CENTER></TD>";

echo "<TD><CENTER>$temp_record2[28]</CENTER></TD></TR>";}

else

if ($temp_record2[9] != 0) {

echo "<TR><TD><CENTER>$temp_record2[0]</CENTER></TD>";

for ($t=1; $t<29; $t++)

echo "<TD><CENTER>$temp_record2[$t]</CENTER></TD>";

echo "<TD><CENTER>$temp_record2[29]</CENTER></TD></TR>";}

else

if ($temp_record2[10] != 0) {

echo "<TR><TD><CENTER>$temp_record2[0]</CENTER></TD>";

for ($t=1; $t<29; $t++)

echo "<TD><CENTER>$temp_record2[$t]</CENTER></TD>";

echo "<TD><CENTER>$temp_record2[29]</CENTER></TD></TR>";}

else

if ($temp_record2[11] != 0) {

echo "<TR><TD><CENTER>$temp_record2[0]</CENTER></TD>";

for ($t=1; $t<29; $t++)

echo "<TD><CENTER>$temp_record2[$t]</CENTER></TD>";

echo "<TD><CENTER>$temp_record2[29]</CENTER></TD></TR>";}

else

if ($temp_record2[12] != 0) {

echo "<TR><TD><CENTER>$temp_record2[0]</CENTER></TD>";

for ($t=1; $t<29; $t++)

echo "<TD><CENTER>$temp_record2[$t]</CENTER></TD>";

echo "<TD><CENTER>$temp_record2[29]</CENTER></TD></TR>";}

else

if ($temp_record2[13] != 0) {

echo "<TR><TD><CENTER>$temp_record2[0]</CENTER></TD>";

for ($t=1; $t<29; $t++)

echo "<TD><CENTER>$temp_record2[$t]</CENTER></TD>";

echo "<TD><CENTER>$temp_record2[29]</CENTER></TD></TR>";}

else

if ($temp_record2[14] != 0) {

echo "<TR><TD><CENTER>$temp_record2[0]</CENTER></TD>";

for ($t=1; $t<29; $t++)