Разработка информационной системы заочного обучения, страница 26

</TD> <TD>

<center><FONT SIZE="-'.$k.'">&nbsp;</FONT>

</TD>';

echo'</TR>';

$result = mysql_query("SELECT * FROM `allgroup`.`kurs$kurs$vibor`");

@ $num = mysql_num_rows($result);

if (isSet($result)){

for ($i=0; $i<$num; $i++){

$myArray = mysql_fetch_array($result);

echo '<TR><form action="izm_plan.php" method="post">';

for ($n=1;$n<=19;$n++){

echo '<TD>'.htmlspecialchars(stripslashes($myArray["p$n"]));

if (htmlspecialchars(stripslashes($myArray["p$n"]))==null) echo "&nbsp";};

echo '</TD><TD><a href="add_plan.php?vibor='.$vibor.'&name='.$myArray["p1"].'&gruppa='.$vibor.'&kurs='.$kurs.'">Удалить</a></TD>

<TD><a href="izm_plan.php?vibor='.$vibor.'&name='.$myArray["p1"].'&gruppa='.$vibor.'&kurs='.$kurs.'">Изменить</a></TD></form>';};

print '</TR>';};

echo '<TR bgcolor="#cccccc">';

echo '<TD><input type="text" size=0 name="st1" size="15%"></TD>';

for ($n=2;$n<=18;$n++)

echo '<TD><input type="text" size="2%" name="st'.$n.'" maxlength="14" border="3"></TD>';

echo '<TD><input type="text" size="2%" name="st'.$n.'" maxlength="14" border="3"></TD>';

echo '</table>

<input type="submit" value="Сохранить изменения!"></FORM>';

include "../footer.php";

}

else include "reg_error.php";

add_plan_menu.php:

<?php

@ session_start();

if (@$HTTP_SESSION_VARS['user']=="admin"){

@$db = mysql_pconnect('localhost','root','');

include "menu_admin.php";

echo'<center><FORM action="add_plan.php" method="post">

Специальность';

$result=1;

$result = mysql_query("SELECT * FROM `allgroup`.vsespec");

$num = mysql_num_rows($result);

echo '<select name="vibor">';

if (isSet($vibor)) echo"<option>$vibor";

for ($i=0; $i<$num; $i++){

$myArray = mysql_fetch_array($result);

echo "<option><p><strong>";

echo htmlspecialchars(stripslashes($myArray['spec']));

echo '</strong>';};

echo '</select>';

echo'Курс

<select name="kurs">';

if (isSet($kurs)) echo"<option>$kurs";

echo'        <option>1

<option>2

<option>3

<option>4

<option>5

<option>6

</select>

<br><input type="submit" value="Добавить план выбранной специальности и семестра">

</center>';

}else include "reg_error.php";

?>

add_rasp.php:

<?php

$result = mysql_query("SELECT * FROM `allgroup`.`rasp$spec`");

@$num = mysql_num_rows($result);

for ($i=0; $i<$num; $i++){

$myArray = mysql_fetch_array($result);

echo '<form action="index_admin_rasp.php" method=post>

<table border=1><TR>

<input type="hidden" name="delet" value=OK>

<input type="hidden" name="spec" value='.$spec.'>

<TD>Дата</TD><TD>Время</TD><TD>Предмет</TD><TD>Кабинет</TD>

</TR>    <TR>

<TD ROWSPAN=2><input type="text" name="dat" size=3 value='.@htmlspecialchars(stripslashes($myArray['data'])).'></TD>

<TD><input type="text" name="time1" size=10 value='.@htmlspecialchars(stripslashes($myArray['time1'])).'></TD>

<TD><input type="text" name="name1" size=30 value='.@htmlspecialchars(stripslashes($myArray['name1'])).'></TD>

<TD ALIGN="right"><input type="text" name="kab1" size=5 value='.@htmlspecialchars(stripslashes($myArray['kab1'])).'></TD>