DOCTYPE html PUBLIC W3C DTD XHTML Transitional EN http www w3 org TR 2

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<LINK REL="stylesheet" HREF="testcss.css" TYPE="text/css">
<title>меню</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<script type="text/javascript">
$(function(){ //функция обертка
var $menu = $("#menu"); //в переменную определим наше меню
$(window).scroll(function(){ //событие скролл
if ($(this).scrollTop() > 120 && $menu.hasClass("default") ){ //(1)
$menu.fadeOut('fast',function(){
$(this).removeClass("default")
.addClass("fixed")
.fadeIn('fast');
});
} else if($(this).scrollTop() <= 120 && $menu.hasClass("fixed")){ //(2)
$menu.fadeOut('fast',function(){
$(this).removeClass("fixed")
.addClass("default")
.fadeIn('fast');
});
}
});
});//jQuery
</script>
<script type="text/javascript">
$(function(){ //функция обертка
$('.block:even').addClass('blocktwo');
});
</script>
</head>
<body>
<header>
<h1>Система самостоятельного обучения</h1>
<nav id="menu" class="default">
<ul>
<li><a href="#" class="current">Обучение</a></li>
<li><a href="#">Новости</a></li>
<li><a href="#">О сайте</a></li>
</ul>
</nav>
</header>
<div id="main">
<?PHP
$hostname = "localhost";
$username = "user1";
$password = "111";
$dbName = "testing";
/* создать соединение */
$link = mysql_connect($hostname,$username,$password) OR DIE("not connect");
@mysql_select_db("$dbName") or die("not choose db ");
mysql_set_charset('utf8');
$idtesting= $_POST["id"];
$typetest=$_POST['type'];
$query_search=mysql_query("SELECT * FROM test WHERE testing = '$idtesting'");
while ( $test = mysql_fetch_array($query_search))
{
echo '<div class="block"><h3>';
echo '
<form method="post" action="test.php">
<input type="hidden" name="id" value="';
echo $test['id'];
echo ' ">
<input type="submit" class="nobutton" value="';
echo $test['question'];
echo '">';
echo "<p> $typetest </p>";
echo '</br>';
echo var_dump($typetest) ;
/*
if($typetest == 'open' )
{
// echo' </br> <input type="text" name="answer">';
echo 'open';
}
if($typetest==='close')
{
// echo' </br> <input type="radio" name="radiobutton">';
echo 'close';
}
*/
echo ' </form>
';
echo '<div class="clearfix"></div>';
echo '</div>';
}
?>
</div>
<footer>
Копирайты
</footer>
</body>
</html>