-
Notifications
You must be signed in to change notification settings - Fork 0
/
qandatest.txt
141 lines (115 loc) · 3.73 KB
/
qandatest.txt
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License
Name : Garden Of Orchids
Description: A two-column, fixed-width design with dark color scheme.
Version : 1.0
Released : 20101115
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Q & A</title>
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
<style type="text/css">
</style>
</head>
<body>
<script type="text/javascript">
function validate(){
var x=document.forms["question"]["na"].value
var y = var x=document.forms["question"]["ema"].value
var z = document.forms["question"]["ans"].value
if (x == ""){
alert ("You must fill in your name!")
return false;
}
else if( y == ""){
alert ("You must fill in your email!")
return false;
}
else if (z ==""){
alert("You not fill in an answer");
return false;
}
else
return true;
}
</script>
<div id ="wrapper">
<div id="header">
<div id="logo">
<a border="0" href = "index.html"> <img border = "0" src = "image/logos.png" ></img></a>
</div>
<div id="search" >
<form name = "look" onsubmit="return validate()" method = "post" action = "/submitSearch">
<input type="text" name="s" id="search-text" value="" method="post">
<input type="submit" id="search-submit" value="SEARCH" />
</form>
</div>
</div>
</div>
<div id = "page">
<div id="sidebar">
<ul>
<li>
<h2>Welcome to Q & A!</h2>
<p>Q & A is an question and answer app that is developed by jars(); To begin answering or asking questions
click on the thought bubbles</p>
</li>
<li>
<h2>Menu</h2>
<ul>
<li> <b> Score: 0 </b></li>
<li><a href="index.html">Home</a></li>
<li><a href="question.html">Ask a Question</a></li>
<li><a href="alist.html">Recent Questions</a></li>
<li><a href="help.html">Help</a></li>
</ul>
</li>
</ul>
</div>
<div id = "content">
<p><a href = "index.html">Home </a> > Q and A</p>
<div id = "qbox">
<h1>{{title}}</h1>
<div id = "qbox-user">{{user}} ({{email}})</div>
<div id = "qbox-date">{{date}}</div>
<br>
<p> {{question}} </p>
</div>
{% for a in answers %}
<div id = "abox">
<h1>{{a.userName}}</h1>
<div id = "abox-date">{{a.date}}</div>
<br>
<p>{{a.Ans}}</p>
</div>
{% endfor %}
<div id = "abutton">
<p>Do you know the answer? Answer it!! </p>
<form name = "answer" onsubmit="return validate()" method = "post" action = "/submitAnswer">
Name: <input type="text" name="na" id="box-text2" value="">
<div style="clear: both;"> </div>
Email: <input type="text" name="ema" id="box-text2" value="">
<div style="clear: both;"> </div>
<textarea name="ans" id="abox-textarea" rows="10" cols="55"></textarea><img src = "image/abutton.png"></img>
<div style="clear: both;"> </div>
<input type="submit" id="box-submit" value="SUBMIT" />
</form>
</div>
</div>
<div style="clear: both;"> </div>
</div>
</div>
<!-- end #page -->
<div id="footer">
<p>Copyright (c) 2011. All rights reserved. Design by jars();</a>.</p>
</div>
<!-- end #footer -->
</body>
</html>