Рефераты

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

<INPUT TYPE=\"text\" SIZE=\"1\" NAME=\"11\">

<INPUT TYPE=\"text\" SIZE=\"1\" NAME=\"12\">

<br>

<INPUT TYPE=\"hidden\" NAME=\"index\" VALUE=\""; echo $_GET['index'];

echo " \">

<INPUT TYPE=\"hidden\" NAME=\"name\" VALUE=\""; echo $temp_record[1];

echo " \">

<INPUT TYPE=\"hidden\" NAME=\"smsp\" VALUE=\""; echo $temp_record[5];

echo " \">

<INPUT TYPE=\"hidden\" NAME=\"month\" VALUE=\""; echo $today['mon'];

echo " \">

<INPUT TYPE=\"hidden\" NAME=\"year\" VALUE=\""; echo $today['year'];

echo " \">

<BR> <BR>

<INPUT TYPE=\"submit\" SIZE=\"5\" VALUE=\"Прийняти\">

</FORM>";

echo "</BODY>

</HTML>";

?>

Додаток 2. Скріпт переносу даних з Web-форми в файл бази даних.

<?php

$bd = dbase_open ("C:\\Apache2\\htdocs\\BD\\2004_Zl_SP1.DBF", 2);

$arr_to_bd[0] = $_GET['index'];

$arr_to_bd[1] = convert_cyr_string ($_GET['name'], w, a);

$arr_to_bd[2] = $_GET['amount'];

$arr_to_bd[3] = $_GET['01'];

$arr_to_bd[4] = $_GET['02'];

$arr_to_bd[5] = $_GET['03'];

$arr_to_bd[6] = $_GET['04'];

$arr_to_bd[7] = $_GET['05'];

$arr_to_bd[8] = $_GET['06'];

$arr_to_bd[9] = $_GET['07'];

$arr_to_bd[10] = $_GET['08'];

$arr_to_bd[11] = $_GET['09'];

$arr_to_bd[12] = $_GET['10'];

$arr_to_bd[13] = $_GET['11'];

$arr_to_bd[14] = $_GET['12'];

$arr_to_bd[15] = $_GET['smsp'];

$arr_to_bd[16] = $_GET['month'];

$arr_to_bd[17] = $_GET['year'];

//$records_counter = dbase_numrecords( $bd);

dbase_add_record ($bd, $arr_to_bd);

//dbase_replace_record ($bd, $arr_to_bd, $records_counter);

echo "<br> $temp";

echo "Запис добавлено. <br>";

dbase_close($bd);

echo "<A HREF=\"\\SP1_Zl_in.html\"> Ввести нову квитанцію. </A>";

?>

Додаток 3. Скріпт створення файлу бази даних сортувальної таблиці.

<?php

$bd_1 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_1_SP5.DBF", 0);

$bd_2 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_2_SP5.DBF", 0);

$bd_3 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_3_SP5.DBF", 0);

$bd_4 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_4_SP5.DBF", 0);

$bd_5 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_5_SP5.DBF", 0);

$bd_6 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_6_SP5.DBF", 0);

$bd_7 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_7_SP5.DBF", 0);

$bd_8 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_8_SP5.DBF", 0);

$bd_9 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_9_SP5.DBF", 0);

$bd_10 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_10_SP5.DBF", 0);

$bd_11 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_11_SP5.DBF", 0);

$bd_12 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_12_SP5.DBF", 0);

$bd_13 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_13_SP5.DBF", 0);

$bd_14 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_14_SP5.DBF", 0);

$bd_15 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_15_SP5.DBF", 0);

$bd_16 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_16_SP5.DBF", 0);

$bd_17 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_17_SP5.DBF", 0);

$bd_18 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_18_SP5.DBF", 0);

$bd_19 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_19_SP5.DBF", 0);

$bd_20 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_20_SP5.DBF", 0);

$bd_21 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_21_SP5.DBF", 0);

$bd_22 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_22_SP5.DBF", 0);

$bd_23 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_23_SP5.DBF", 0);

$bd_24 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_24_SP5.DBF", 0);

$bd_25 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_25_SP5.DBF", 0);

$bd_26 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_26_SP5.DBF", 0);

$bd_27 = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_27_SP5.DBF", 0);

$bd_Zl = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_Zl_SP5.DBF", 0);

$bd_ST = dbase_open("C:\\Apache2\\htdocs\\BD\\2004_04_ST.DBF", 2);

$records_counter = dbase_numrecords($bd_1);

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

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

$temp_record = dbase_get_record ($bd_1, $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[2] = $temp_record_ST[2] + $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_2, $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[3] = $temp_record_ST[3] + $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_3, $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[4] = $temp_record_ST[4] + $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_4, $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[5] = $temp_record_ST[5] + $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_5, $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[6] = $temp_record_ST[6] + $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_6, $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[7] = $temp_record_ST[7] + $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_7, $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[8] = $temp_record_ST[8] + $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_8, $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[9] = $temp_record_ST[9] + $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_9, $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[10] = $temp_record_ST[10] + $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_10, $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[11] = $temp_record_ST[11] + $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_11, $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[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:\\Apache2\\htdocs\\BD\\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>Пол</T

D><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> </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++)

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

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

else

if ($temp_record2[15] != 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[16] != 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[17] != 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[18] != 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[19] != 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[20] != 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[21] != 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[22] != 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[23] != 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[24] != 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[25] != 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[26] != 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[27] != 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[28] != 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[29] != 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>";}

}

echo "

</TABLE>

";

dbase_close ($bd);

?>

Страницы: 1, 2


© 2010 Современные рефераты