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

</TR>    <TR>

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

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

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

</TR></table>

<input type="submit" name="button" value="УДАЛИТЬ">

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

};

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

<h3>Добавить день</h3>

<TABLE BORDER=1>

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

</TR>    <TR>

<TD ROWSPAN=2><input type="text" name="dat" size=3></TD>

<TD><input type="text" name="time1" size=10></TD>

<TD><input type="text" name="name1" size=30></TD>

<TD ALIGN="right"><input type="text" name="kab1" size=5></TD>

</TR>    <TR>

<TD><input type="text" name="time2" size=10></TD>

<TD><input type="text" name="name2" size=30></TD>

<TD ALIGN="right"><input type="text" name="kab2" size=5></TD>

</TR></TABLE>

<input type="hidden" name="add" value="addOK">

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

<input type="submit" value="Добавить"></form>';

?>

add_stol.php:

<?php

@ session_start();

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

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

if (@$delet=="OK"){

mysql_query("DELETE FROM `allgroup`.`stol_all` WHERE `ID` = '$id_ob' LIMIT 1;");

};

if (@$name && $all_text)

{ $dat = date("y.m.d");

$tm = date("h:i:s");

mysql_query("INSERT INTO `allgroup`.`stol_all` (`ID`, `NAME`, `message`,`data`) VALUES ('', '$name', '$all_text','$dat')");

};

include "../header.php";

include "menu_services.php";

include "doska_admin.php";

echo '<HR><form name="form1" action="add_stol.php" method=post>

Автор объявления:<p> <input type="text" name="name" size=30><p>

Текст объявления<p>

<TEXTAREA NAME="all_text" ROWS=7 COLS=50>

</TEXTAREA>

<p><input type="submit" value="Добавить объявление!!">';

include "../footer.php";}

else include "reg_error.php";

?>

add_stud_menu.php:

<?php

@ session_start();

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

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

include "../header.php";

include "menu_stud.php";

echo'<form name="form1" action="add_stud.php" method="post">

<center>  Специальность:';

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

$num = mysql_num_rows($result);

print '<select name="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><br><input type="submit" value="Добавить студента выбраной специальности">';

include "../footer.php";}

else include "reg_error.php";?>

add_stud_plan.php:

<?php

@ session_start();