-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
67 lines (60 loc) · 2.17 KB
/
index.php
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
<!DOCTYPE html>
<html>
<head>
<title>FlowOverStack</title>
<link rel="stylesheet" media="screen and (max-device-width: 800px)" href="mobilestyles.css" >
<link rel="stylesheet" media="screen and (min-device-width: 800px)" href="styles.css" />
</head>
<body>
<?php include 'includes/question_DB.php'; ?>
<div class="container">
<div class="menu">
<img class="logo" src="images/FlowOverStackLogo.png" alt="logo" height="53" width="300" />
<a class="active" href="">Home</a>
<a href="feedback.php">Feedback</a>
<a href="about.php">About</a>
<button id="btnAsk" onclick="btnAskOnClick()">Ask a question</button>
<form method="GET">
<input class="search" type="text" name="search" placeholder="Search..." onKeyPress="return checkSubmit(event)"></input>
</form>
</div>
</div>
<script>
function btnAskOnClick() {
questionsContainer.style.display = "none";
dialogContainer.style.display = "block";
}
function btnAskCancelOnClick() {
questionsContainer.style.display = "block";
dialogContainer.style.display = "none";
}
</script>
<div id="dialogContainer">
<div class="dialog"></div>
<h1 class="createAskQuestionH1">Ask a question</h1>
<br><br><br>
<form action="" method="GET" class="questionForm">
<div class="titleContainer">
<label for="title" class="askQuestionTitleLabel" >Title: </label>
<input type="text" name="title" required
minlength="10" maxlength="200" class="askQuestionTitleInput" >
</div>
<label class="askQuestionDescriptionLabel">Description: </label>
<div class="askQuestionDescriptionContainer">
<textarea rows="7" cols="103" maxlength="2000" name="description" class="askQuestionDescriptionInput"></textarea>
</div>
<input type="submit" name="submit" value="Ask Question" class="askQuestionSubmit" >
<input type="button" value="Cancel" id="askQuestionCancel" onclick="btnAskCancelOnClick()">
</form>
</div>
<div id="questionsContainer">
<h1>Questions</h1>
<br>
<ul class="questions">
<?php
fetchQuestionTitleFromDB();
?>
</ul>
</div>
</body>
</html>