forked from Vita3K/Vita3K.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
blog_admin.html
98 lines (85 loc) · 3.52 KB
/
blog_admin.html
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
---
texts: compatibility
nav: blog
---
<!DOCTYPE html>
<html ng-app="Vita3K">
<head>
{% include head.html %}
</head>
<body id="page-top" ng-controller="angularController">
<script>
function get(name) {
if (name = (new RegExp('[?&]' + encodeURIComponent(name) + '=([^&]*)')).exec(location.search))
return decodeURIComponent(name[1]);
}
angular.module('Vita3K', []).controller("angularController", function($scope, $http, $window) {
{% include languagescript.js %}
$http.post('https://vita3k.rinnegatamante.it/get_reports.php').then(function(res){
$scope.reports = res.data
})
$scope.data = {}
$scope.remove = function(id) {
$scope.data.password = $scope.password
$scope.data.id = id
$http.post('https://vita3k.rinnegatamante.it/remove.php', $scope.data).then(res => {
$http.post('https://vita3k.rinnegatamante.it/get_reports.php').then(function(res){
$scope.reports = res.data
})
})
}
$scope.edit = function(id) {
$window.location.href = "/blog_update.html?id=" + id;
}
});
</script>
{% include nav.html %}
{% include languageselection.html %}
<section class="text-white" id="compatibility">
<div class="container">
<div class="row">
<div class="col-lg-12 mx-auto text-center">
<h3>Blog Admin Panel</h3>
</div>
</div>
</div>
</section>
<section class="bg-dark text-white">
<div class="container">
<div class="row">
<div class="col-lg-12 mx-auto text-center">
<input type="text" ng-model="password" class="form-control" placeholder="Password" required="true" /><br>
<center>
<table cellpadding="12" class="table-hover table-bordered table-striped">
<thead>
<tr>
<td><font color=yellow><small>ID</small></font></td>
<td><font color=yellow><small>Title</small></font></td>
<td><font color=yellow><small>Author</small></font></td>
<td colspan="2"><font color=yellow><small>Actions</small></font></td>
</tr>
</thead>
<tbody>
<tr ng-repeat="report in reports">
<td>{{report.id}}</td>
<td>{{report.title}}</td>
<td>{{report.author}}</td>
<td>
<a class="btn btn-primary btn-xl js-scroll-trigger" href="" ng-click="edit(report.id)">Edit</a>
</td>
<td>
<a class="btn btn-primary btn-xl js-scroll-trigger" href="" ng-click="remove(report.id)">Remove</a>
</td>
</tr>
</tbody>
</table>
<br><br>
<a class="btn btn-primary btn-xl js-scroll-trigger" href="blog_add.html">Add an Entry</a>
</center>
</div>
</div>
</div>
</section>
{% include footer.html %}
</body>
</html>