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

$myArray = mysql_fetch_array($result);

echo '<tr><form action="add_stol.php" method=post><input type="hidden" name="delet" value=OK>

<input type="hidden" name="id_ob" value='.@htmlspecialchars(stripslashes($myArray['ID'])).'><td bgcolor="#89BBE7"><b><FONT color="#800080">Объявление опубликовал:</FONT>

<FONT color=darkred>'.@htmlspecialchars(stripslashes($myArray['NAME'])).'</b>(от '.@htmlspecialchars(stripslashes($myArray['data'])).')</td></tr>

<tr><td bgcolor="#87CEEB">

</FONT>&nbsp;&nbsp;'.htmlspecialchars(stripslashes($myArray['message'])).'</td></tr>

</tr><tr><td>

<input type="submit" value="УДАЛИТЬ"></form></td></tr>';

};

echo '</table>';

}else include "reg_error.php";

?>

doska_stud.php:

<?php

@ $user_name = $s1;//$HTTP_SESSION_VARS['nick'];

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

$user_nomer = $s2;//$HTTP_SESSION_VARS['password'];

$group = $k;//$HTTP_SESSION_VARS['group'];

include "header_stud.php";

echo '<FONT color="#87CEEB"><h3>Общая доска объявлений</h3></FONT>';

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

$num = mysql_num_rows($result);

echo '<table border=0>';

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

$myArray = mysql_fetch_array($result);

echo '<tr><td bgcolor="#89BBE7"><b><FONT color="#800080">Объявление опубликовал:</FONT>

<FONT color=darkred>'.@htmlspecialchars(stripslashes($myArray['NAME'])).'</b></td></tr>

<tr><td bgcolor="#87CEEB">

</FONT>&nbsp;&nbsp;'.htmlspecialchars(stripslashes($myArray['message'])).'</td></tr>

</tr>';

}; echo '</table>';

include "../footer.php";

?>

header_stud.php:

<?php

echo '<html>

<head>

<title>Дистанционное обучение. ГУЦМиЗ</title>

<!--meta http-equiv="Content-Type" content="text/html"-->

<META content="text/html; charset=windows-1251" http-equiv=Content-type>

<style>

<!-A:visited {text-decoration: none; color: 317BBC}

A:hover {text-decoration: none; color: 89BBE7}

A:link {text-decoration: none; color: 317BBC}

A:active {text-decoration: none; color: navy}

A:{text-decoration: none}

-->

</style>

<style type="text/css">

<!-.header {  background-attachment: fixed; background-image: url(images/1.jpg); background-repeat: no-repeat; background-position: 0px 0px}

.main_header {  background-attachment: scroll; background-image: url(images/main/head.jpg); background-repeat: no-repeat; background-position: 0px 0px}

.main_footer {  background-attachment: scroll; background-image: url(images/main/footer.jpg); background-repeat: no-repeat; background-position: 0px 0px}

table {   color: #000000; text-decoration: none; font-family: Verdana, Arial, Helvetica, sans-serif}

textarea {   color: #000000; text-decoration: none; font-family: Verdana, Arial, Helvetica, sans-serif}

select {  color: #000000; text-decoration: none; font-family: Verdana, Arial, Helvetica, sans-serif}

input {   color: #000000; text-decoration: none; font-family: Verdana, Arial, Helvetica, sans-serif}

body {   color: #000000; text-decoration: none; font-family: Verdana, Arial, Helvetica, sans-serif}

ul {color: #317BBC; text-decoration: none; font-family: Verdana, Arial, Helvetica, sans-serif }

-->

</style>

<style>

.MenuItem, .MenuItemOpen { list-style: none; cursor: pointer}

.MenuItem ul {display: none}

.MenuItemOpen ul {display: block; font-size: 80%}

</style>

<script>

function MenuClick(){

var obj = event.srcElement;

if (obj.tagName == \'LI\') {

obj.className = (obj.className == \'MenuItem\' ? \'MenuItemOpen\' : \'MenuItem\');

event.cancelBubble = true;

}

}