Compare commits

..

No commits in common. "a59fcdca3050c2699bc919259a47c96652f861b4" and "23a98a23cf32a0613142f74e1c5bd0e293a6f57c" have entirely different histories.

3 changed files with 97 additions and 170 deletions

View File

@ -1,70 +1,46 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head>
<head>
<!-- Default page settings --> <!-- Default page settings -->
<title>Admin Panel</title> <title>Admin Panel</title>
<meta charset="utf-8" /> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="../Images/UFO.png" /> <link rel="shortcut icon" href="../Images/UFO.png" />
<!-- Default page settings end --> <!-- Default page settings end -->
<!-- CSS --> <!-- CSS -->
<link <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css"
integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="../Styles/Index.css" /> <link rel="stylesheet" href="../Styles/Index.css" />
<link rel="stylesheet" href="../Styles/AdminPage.css" /> <link rel="stylesheet" href="../Styles/AdminPage.css" />
<link <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
rel="stylesheet" <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/overlayscrollbars/1.13.1/css/OverlayScrollbars.css" />
href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css" integrity="sha512-HK5fgLBL+xu6dm/Ii3z4xhlSUyZgTT9tuc/hSrtw6uzJOvgRr2a9jyxxT1ely+B+xFAmJKVSTbpM/CuL7qxO8w==" crossorigin="anonymous" />
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/overlayscrollbars/1.13.1/css/OverlayScrollbars.css"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css"
integrity="sha512-HK5fgLBL+xu6dm/Ii3z4xhlSUyZgTT9tuc/hSrtw6uzJOvgRr2a9jyxxT1ely+B+xFAmJKVSTbpM/CuL7qxO8w=="
crossorigin="anonymous"
/>
<!-- CSS end --> <!-- CSS end -->
<!-- Header scripts --> <!-- Header scripts -->
<script <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous"
></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/moment@2.29.1/moment.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/moment@2.29.1/moment.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/inputmask@5.0.5/dist/jquery.inputmask.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/inputmask@5.0.5/dist/jquery.inputmask.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/overlayscrollbars/1.13.1/js/jquery.overlayScrollbars.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/overlayscrollbars/1.13.1/js/jquery.overlayScrollbars.js"></script>
<script <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.6.0/dist/umd/popper.min.js" integrity="sha384-KsvD1yqQ1/1+IA7gi3P0tyJcT3vR+NdBTt13hSJ2lnve8agRGXTTyNaBYmCR/Nwi" crossorigin="anonymous"></script>
src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.6.0/dist/umd/popper.min.js" <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.min.js" integrity="sha384-nsg8ua9HAw1y0W1btsyWgBklPnCUAFLuTMS2G72MMONqmOymq585AcH49TLBQObG" crossorigin="anonymous"></script>
integrity="sha384-KsvD1yqQ1/1+IA7gi3P0tyJcT3vR+NdBTt13hSJ2lnve8agRGXTTyNaBYmCR/Nwi"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.min.js"
integrity="sha384-nsg8ua9HAw1y0W1btsyWgBklPnCUAFLuTMS2G72MMONqmOymq585AcH49TLBQObG"
crossorigin="anonymous"
></script>
<!-- Header scripts end --> <!-- Header scripts end -->
</head> </head>
<body>
<body>
<div class="HeaderPanel" id="header"> <div class="HeaderPanel" id="header">
<div class="HeaderLeft"> <div class="HeaderLeft">
<a style="display: inline-block" href="../Index.html"> <a style="display: inline-block;" href="../Index.html">
<i class="fas fa-arrow-left"></i> <i class="fas fa-arrow-left"></i>
</a> </a>
</div> </div>
<div class="HeaderTitle"> <div class="HeaderTitle">
<h2 style="margin-bottom: 0px">Admin Panel</h2> <h2 style="margin-bottom: 0px">
Admin Panel
</h2>
</div> </div>
</div> </div>
@ -81,14 +57,7 @@
<input type="text" name="newGameJam" id="nameOfGameJam"> --> <input type="text" name="newGameJam" id="nameOfGameJam"> -->
<div class="FormField"> <div class="FormField">
<input <input type="text" class="FormFieldInput" placeholder="Gamejam title" name="newGameJam" id="GamejamTitle" required>
type="text"
class="FormFieldInput"
placeholder="Gamejam title"
name="newGameJam"
id="GamejamTitle"
required
/>
<label for="GamejamTitle" class="FormFieldLabel"> <label for="GamejamTitle" class="FormFieldLabel">
Gamejam title Gamejam title
</label> </label>
@ -96,77 +65,37 @@
<div class="FormField"> <div class="FormField">
<div id="Dates"> <div id="Dates">
<input <input type="date" class="FormFieldInput" placeholder="mm/dd/yyyy" name="startDate" id="startDate" required>
type="date"
class="FormFieldInput"
placeholder="mm/dd/yyyy"
name="startDate"
id="startDate"
required
/>
<label for="startDate" class="FormFieldLabel" id="startDateLabel"> <label for="startDate" class="FormFieldLabel" id="startDateLabel">
Start dato Start dato
</label> </label>
<input <input type="date" class="FormFieldInput" placeholder="mm/dd/yyyy" name="endDate" id="endDate" required>
type="date"
class="FormFieldInput"
placeholder="mm/dd/yyyy"
name="endDate"
id="endDate"
required
/>
<label for="endDate" class="FormFieldLabel" id="endDateLabel"> <label for="endDate" class="FormFieldLabel" id="endDateLabel">
Slut dato Slut dato
</label> </label>
</div> </div>
<div class="Times"> <div class="Times">
<input type="text" class="FormFieldInput" placeholder="hh:mm" name="startTime" id="startTime" required>
<label for="startTime" class="FormFieldLabel" id="startTimeLabel"> <label for="startTime" class="FormFieldLabel" id="startTimeLabel">
Start Start tidspunkt
</label> </label>
<input
type="text"
class="FormFieldInput"
placeholder="hh:mm"
name="startTime"
id="startTime"
required
/>
<input <input type="text" class="FormFieldInput" placeholder="hh:mm" name="endTime" id="endTime" required>
type="text"
class="FormFieldInput"
placeholder="hh:mm"
name="endTime"
id="endTime"
required
/>
</div> </div>
</div> </div>
<div class="FormField"> <div class="FormField">
<input <input type="text" class="FormFieldInput" placeholder="Emne / Keywords (Ikke obligatorisk)" name="keyWord" id="keyWord" required>
type="text"
class="FormFieldInput"
placeholder="Emne / Keywords (Ikke obligatorisk)"
name="keyWord"
id="keyWord"
required
/>
<label for="keyWord" class="FormFieldLabel" id="keyWordLabel"> <label for="keyWord" class="FormFieldLabel" id="keyWordLabel">
Emne / Keywords (Ikke obligatorisk) Emne / Keywords (Ikke obligatorisk)
</label> </label>
</div> </div>
<div class="FormField"> <div class="FormField">
<textarea <textarea class="FormFieldInput" placeholder="Beskrivelse" name="description" id="Beskrivelse" required></textarea>
class="FormFieldInput"
placeholder="Beskrivelse"
name="description"
id="Beskrivelse"
required
></textarea>
<label for="keyWord" class="FormFieldLabel" id="keyWordLabel"> <label for="keyWord" class="FormFieldLabel" id="keyWordLabel">
Beskrivelse Beskrivelse
</label> </label>
@ -177,15 +106,16 @@
<label for="floatingTextarea2">Beskrivelse</label> <label for="floatingTextarea2">Beskrivelse</label>
</div> --> </div> -->
<input type="submit" name="newGameJam" id="indsend" value="Indsend" /> <input type="submit" name="newGameJam" id="indsend" value="Indsend">
</form> </form>
</div> </div>
<!-- Opret game jam slut --> <!-- Opret game jam slut -->
<!-- Body scripts --> <!-- Body scripts -->
<script src="../Javascript/OverlayScrollbar.js"></script> <script src="../Javascript/OverlayScrollbar.js"></script>
<!--<script src="../Javascript/AddEvent.js"></script>--> <script src="../Javascript/AddEvent.js"></script>
<script src="../Javascript/AddGameJam.js"></script> <script src="../Javascript/AddGameJam.js"></script>
<!-- Body scripts end --> <!-- Body scripts end -->
</body> </body>
</html> </html>

View File

@ -183,7 +183,7 @@
id="AdminPanel" id="AdminPanel"
type="button" type="button"
class="nav-link LoginButton" class="nav-link LoginButton"
href="../Frontend/Html/AdminPage.html" href="/Frontend/Html/AdminPage.html"
style="display: none" style="display: none"
> >
Admin Panel Admin Panel

View File

@ -1,32 +1,29 @@
$(document).ready(function () { $(document).ready(function() {
axios.defaults.baseURL = "http://localhost/Game-Jaming";
$("#createGameJam").submit(function (e) { $('#createGameJam').submit(function(e) {
let URL = "/Backend/Controllers/GameJam/NewGameJam.php"; let URL = 'https://ptsv2.com/t/tzztn-1616799712/post';
let form = $("#createGameJam")[0]; let form = $('#createGameJam')[0];
let formData = new FormData(form); let formData = new FormData(form);
let id = $("#indsend").attr("name"); let id = $('#indsend').attr('name');
let value = $("#indsend").val(); let value = $('#indsend').val();
let startTime = $("#startTime").text(); let startTime = $("#startTime").text();
let endTime = $("#endTime").text(); let endTime = $("#endTime").text();
formData.append(id, value); formData.append(id, value);
formData.set("startTime", startTime); formData.set('startTime', startTime);
formData.append("endTime", endTime); formData.append('endTime', endTime);
axios axios.post(URL, formData, {
.post(URL, formData, { header: 'multipart/form-data'
header: "multipart/form-data", }).then(res => {
}) if (res.status === 200)
.then((res) => { {
if (res.status === 200) { console.log('New Game Jam Created!');
console.log("New Game Jam Created!");
} }
}) }).catch(error => {
.catch((error) => {
console.log(error.response); console.log(error.response);
}); });