-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex-all.php
135 lines (102 loc) · 3.74 KB
/
index-all.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
<?php
require_once ("sql.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="/assets/images/favicon.ico">
<title>CloudFlare WebPanel</title>
<!-- Bootstrap core CSS -->
<link href="/assets/css/bootstrap.min.css" rel="stylesheet">
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="/assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="/assets/css/engine.css" rel="stylesheet">
<link rel="stylesheet" href="/assets/css/font-awesome.min.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Fixed navbar -->
<?php include("nav.php"); ?>
<!-- Begin page content -->
<div class="container">
<div class="page-header">
<h1>Все аккаунты</h1>
</div>
<table class="table table-striped table-hover ">
<thead>
<tr>
<th>#</th>
<th>Аккаунт</th>
<th>Домен</th>
<th>Действие</th>
</tr>
</thead>
<tbody>
<?php
$data = $mysqli->query("SELECT * FROM users");
while($row = $data->fetch_array()) {
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, "https://api.cloudflare.com/client/v4/zones");
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
$headers = [
'X-Auth-Email: ' . $row["email"],
'X-Auth-Key: ' . $row["api"],
'Content-Type: application/json'
];
curl_setopt($connection, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($connection);
curl_close($connection);
$result = json_decode($result);
if(isset($result->result)) {
foreach ($result->result as $val)
{
echo "<tr>";
echo "<td>".$row["id"]."</td>";
echo "<td>".$row["name"]."</td>";
echo "<td>".$val->name."</td>";
echo "<td><a href=\"/edit.php?zone_id={$val->id}&user_id={$row["id"]}\"><i class=\"fa fa-pencil\" aria-hidden=\"true\"></i></a></td>";
echo "</tr>";
}
}
}
$mysqli->close();
?>
</tbody>
</table>
</div>
<footer class="footer navbar-default">
<div class="container">
<p class="text-muted pull-right">Version 0.1-git-asdADqsdf</p>
<p class="text-muted pull-left">EpicMorg <i class="fa fa-copyright" aria-hidden="true"></i> 2017</p>
</div>
</footer>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script>window.jQuery || document.write('<script src="/assets/js/jquery-3.1.1.min.js"><\/script>')</script>
<script src="/assets/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="/assets/js/ie10-viewport-bug-workaround.js"></script>
<script type="text/javascript">
$(document).ready(function() {
function changeClass(){
$("#page-main").removeClass("active");
$("#page-settings").removeClass("active");
$("#page-show-all").addClass("active");
$("#page-show").addClass("active");
}
changeClass();
});
</script>
</body>
</html>