-
Notifications
You must be signed in to change notification settings - Fork 2
/
admin-client.php
106 lines (89 loc) · 3.24 KB
/
admin-client.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="java-script/jquery-1.8.2.min.js"></script>
<script src="java-script/angular.min.js"></script>
<script src="java-script/bootstrap.js" type="text/javascript"></script>
<link rel="stylesheet" href="style/bootstrap.css">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<style>
body {
overflow-x: hidden;
/*background-color: antiquewhite;*/
background-image: url(pics/body1.jpg);
background-size: cover;
}</style>
<script>
var module = angular.module("mymodule", []);
module.controller("mycontroller", function($scope, $http) {
$scope.showAll = function() {
$scope.jsonAry;
$http.get("admin-client-fetch.php").then(fine, notfine);
function fine(response) {
//alert("hii");
// alert(JSON.stringify(response));
// alert(JSON.stringify(response.data)); //== jsonAry
$scope.jsonAry = response.data;
//console.log(JSON.stringify(response));
}
function notfine(response) {
alert(JSON.stringify(response));
}
}
//-=-=-=-=-=-=-delete
$scope.doDelete = function(uid) {
if (confirm("R u Sure?") == true) {
$http.get("admin-client-delete-process.php?uid=" + uid).then(fine, notfine);
function fine(response) {
//alert(JSON.stringify(response.data));
$scope.showAll();
}
function notfine(response) {
alert("not fine");
alert(JSON.stringify(response));
}
}
}
});
</script>
</head>
<body ng-app="mymodule" ng-controller="mycontroller" ng-init="showAll();">
<font color="white">
<center>
<h3><u> All client's data </u></h3>
</center>
<br><br>
<div class="container">
Search:<input type="text" ng-model="google.uid">
<br><br>
<table class="table table-striped table-bordered">
<tr>
<th>User-id</th>
<th>Name</th>
<th>Mobile</th>
<th>City</th>
<th>Pic</th>
<th>Remove</th>
</tr>
<tr ng-repeat="oneObj in jsonAry|filter:google" class="text-white">
<td>{{oneObj.uid}}</td>
<td>{{oneObj.name}}</td>
<td>{{oneObj.mobile}}</td>
<td>{{oneObj.city}}</td>
<td>
<a href="cont-images/{{oneObj.pic}}" target="_blank">
<center><img src="cont-images/{{oneObj.pic}}" alt="" height="50" width="50">
</center>
</a>
</td>
<td>
<div class="btn btn-danger" ng-click="doDelete(oneObj.uid);">Delete</div>
</td>
</tr>
</table>
</div>
</font>
</body>
</html>