-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddCitation.php
199 lines (189 loc) · 10.3 KB
/
addCitation.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
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<?php
session_start();
if ( !isset ( $_SESSION["sessionID"] ) ){
header("Location: hahaNotLoggedIn.php");
} ?>
<!DOCTYPE html>
<html lang="en">
<form action="addCitationHandler.php" method="post">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Add Citation</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom fonts for this template -->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="vendor/simple-line-icons/css/simple-line-icons.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
<!-- Custom styles for this template -->
<link href="css/landing-page.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/custom.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
</head>
<body>
<header class="almost-masthead text-white text-center">
<h1 class="mb-0 pb-0">Scholarship in Classical Receptions in SF & Fantasy</h1>
</header>
<!-- Navigation -->
<nav class="navbar navbar-light bg-light static-top">
<div class="container">
<a class="navbar-brand" href="index.php">Search</a>
<!--<a class="btn btn-primary" href="#">Sign In</a>-->
<a class="navbar-brand" href="contactUs.php">Contact Us & Suggest Scholarship</a>
</div>
</nav>
<!-- Masthead -->
<header class="masthead text-white text-center">
<div class="overlay"></div>
<div class="container">
<div class="col-xl-9 mx-auto">
<h1 class="mb-1">Add Citation</h1>
</div>
<div class="row">
<form method="POST" name="add_stuff" id="add_stuff">
<div class="col-md-6 col-lg-6 mb-2 mb-md-0">
<div class="form-group">
<div class="form-row">
<div class="col-12 col-lg-12 mb-2 mb-md-0">
<input type="text" class="form-control form-control-lg" placeholder="Section Title (Optional)" name = "title" tabindex="1">
<input type="text" class="form-control form-control-lg" placeholder="Source Name" name = "name" tabindex="1" required>
</div>
<div class="col-6 col-lg-6 mb-2 mb-md-0">
<!--<input type="text" class="form-control form-control-lg" placeholder="Author First Name" name = "author_fname" tabindex="4">-->
<input type="text" class="form-control form-control-lg" placeholder="Language" name = "language" tabindex="2" required>
<input type="text" class="form-control form-control-lg" placeholder="Year of Publication" name = "year_of_publication" tabindex="8" required>
<input type="text" class="form-control form-control-lg" placeholder="Page Start" name = "page_start" tabindex="8">
<input type="text" class="form-control form-control-lg" placeholder="Original Year" name = "original_year" tabindex="8">
</div>
<div class="col-6 col-lg-6 mb-2 mb-md-0">
<input type="text" class="form-control form-control-lg" placeholder="Publisher" name = "publisher" tabindex="9">
<input type="text" class="form-control form-control-lg" placeholder="Place of Publication" name = "place_of_publication" tabindex="8">
<input type="text" class="form-control form-control-lg" placeholder="Page End" name = "page_end" tabindex="8">
<input type="text" class="form-control form-control-lg" placeholder="Edition" name = "edition" tabindex="8">
</div>
</div>
</div>
<button type="submit" name="submit" id="submit" class="btn btn-block btn-lg btn-primary mb-5">Submit</button>
</div>
<div class="col-md-6 col-lg-6 mb-2 mb-md-0">
<div class="form-group">
<!--Dynamic Add Author Buttons-->
<!-- <form name="add_Author" id="add_Author" method="POST"> -->
<div class="table-responsive">
<table class="table table-bordered" id="dynamic_field_Author">
<tr>
<td><button type="button" name="addAuthor" id="addAuthor" class="btn btn-success">Add More</button></td>
<td><input type="text" name="AuthorFirstName[]" placeholder="Author First Name" class="form-control name_list" /></td>
<td><input type="text" name="AuthorLastName[]" placeholder="Author Last Name" class="form-control name_list" /></td>
</tr>
</table>
</div>
<div class="table-responsive">
<table class="table table-bordered" id="dynamic_field_Editor">
<tr>
<td><button type="button" name="addEditor" id="addEditor" class="btn btn-success">Add More</button></td>
<td><input type="text" name="EditorFirstName[]" placeholder="Editor First Name" class="form-control name_list" /></td>
<td><input type="text"name="EditorLastName[]" placeholder="Editor Last Name" class="form-control name_list" /></td>
</tr>
</table>
</div>
<div class="table-responsive">
<table class="table table-bordered" id="dynamic_field_Translator">
<tr>
<td><button type="button" name="addTranslator" id="addTranslator" class="btn btn-success">Add More</button></td>
<td><input type="text" name="TranslatorFirstName[]" placeholder="Translator First Name" class="form-control name_list" /></td>
<td><input type="text" name="TranslatorLastName[]" placeholder="Translator Last Name" class="form-control name_list" /></td>
</tr>
</table>
</div>
</div>
</div>
</form>
</div>
</div>
</header>
<!-- Footer -->
<footer class="footer bg-light">
<div class="container">
<div class="row">
<div class="col-lg-6 h-100 text-center text-lg-left my-auto">
<ul class="list-inline mb-2">
<!-- <li class="list-inline-item">
<a href="#">About</a>
</li> -->
<!-- <li class="list-inline-item">⋅</li> -->
<li class="list-inline-item">
<a href="contactUs.php">Contact</a>
</li>
<!-- <li class="list-inline-item">⋅</li> -->
<!-- <li class="list-inline-item">
<a href="#">Terms of Use</a>
</li> -->
<li class="list-inline-item">⋅</li>
<li class="list-inline-item">
<a href="login_page.php">Administration</a>
</li>
<?php
if (isset($_SESSION["sessionID"])){
echo "<li class=\"list-inline-item\">⋅</li>
<li class=\"list-inline-item\"><a href=\"logout.php\">Logout</a></li>
<li class=\"list-inline-item\">⋅</li>
<li class=\"list-inline-item\"><a href=\"addCitation.php\">Add Citation</a></li>
<li class=\"list-inline-item\">⋅</li>
<li class=\"list-inline-item\"><a href=\"create_account.php\">Create New Account</a></li>";
}
?>
</ul>
</div>
<div class="col-lg-6 h-100 text-center text-lg-right my-auto">
<ul class="list-inline mb-0">
<li class="list-inline-item mr-3">
<a href="https://www.facebook.com/ClassicalTraditionsScienceFiction/">
<i class="fa fa-facebook fa-2x fa-fw"></i>
</a>
</li>
<li class="list-inline-item mr-3">
<a href="https://twitter.com/CTSFMF">
<i class="fa fa-twitter fa-2x fa-fw"></i>
</a>
</li>
<li class="list-inline-item mr-3">
<a href="https://www.facebook.com/classicaltraditionsinmodernfantasy/">
<i class="fa fa-facebook fa-2x fa-fw"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
</footer>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
</body>
</form>
</html>
<script>
$(document).ready(function(){
var i=1;
$('#addAuthor').click(function(){
i++;
$('#dynamic_field_Author').append('<tr id="row'+i+'"><td><button type="button" name="remove" id="'+i+'" class="btn btn-danger btn_remove">X</button></td><td><input type="text" name="AuthorFirstName[]" placeholder="Author First Name" class="form-control" /></td><td><input type="text" name="AuthorLastName[]" placeholder="Author Last Name" class="form-control" /></td></tr>');
});
$('#addEditor').click(function(){
i++;
$('#dynamic_field_Editor').append('<tr id="row'+i+'"><td><button type="button" name="remove" id="'+i+'" class="btn btn-danger btn_remove">X</button></td><td><input type="text" name="EditorFirstName[]" placeholder="Editor First Name" class="form-control" /></td><td><input type="text" name="EditorLastName[]" placeholder="Editor Last Name" class="form-control" /></td></tr>');
});
$('#addTranslator').click(function(){
i++;
$('#dynamic_field_Translator').append('<tr id="row'+i+'"><td><button type="button" name="remove" id="'+i+'" class="btn btn-danger btn_remove">X</button></td><td><input type="text" name="TranslatorFirstName[]" placeholder="Translator First Name" class="form-control" /></td><td><input type="text" name="TranslatorLastName[]" placeholder="Translator Last Name" class="form-control" /></td></tr>');
});
$(document).on('click', '.btn_remove', function(){
var button_id = $(this).attr("id");
$('#row'+button_id+'').remove();
});
});
</script>