-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
335 lines (299 loc) · 13.4 KB
/
index.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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<?php
if(!isset($_SESSION)){
session_start();
}
$access_roles = [1];
if(! in_array($_SESSION['login'],$access_roles)){
header("location: login.php");
die();
}
require_once("config.php");
?>
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=2, viewport-fit=cover" />
<meta name="description" content="في هذه الصفحة الرئيسية لشركة النهر تستطيع ان تتعرف على الطلبيات الخاصة بك الواصة والراجعة والكثير من المعلومات">
<meta name="الصفحة الرئيسية للعميل" property="og:title" content="معلومات متكاملة للعميل في هذه الصفحة خاصة بعملاء شركة النهر">
<title>الصفحة الرئيسية للعميل</title>
<link href="https://fonts.googleapis.com/css?family=Cairo:300,300i,400,400i,500,500i,700,700i,900,900i|Source+Sans+Pro:300,300i,400,400i,600,600i,700,700i,900,900i" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="styles/style.css">
<link rel="stylesheet" type="text/css" href="styles/framework.css">
<link rel="stylesheet" type="text/css" href="styles/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="fonts/css/fontawesome-all.min.css">
<link rel="stylesheet" type="text/css" href="bootstrap-4.3.1-dist/css/toast.css">
</head><!--#FF6347;-->
<body class="theme-light" data-background="none" data-highlight="orange">
<style type="text/css">
.bg-div1 {
background-color:#f96332;
color: #000000;
}
.bg-div2 {
background-color: #f96332;
}
.bg-div3 {
background-color: #f96332;
}
.bg-div4 {
background-color: #f96332;
}
.bg-div5 {
background-color: #f96332;
}
.bg-div6 {
background-color: #E9DF00;
}
.bg-div7 {
background-color: #03FCBA;
}
.bg-div8 {
background-color: #4CAF50;
color: #000000;
}
.bg-div9 {
background-color: #0B4EBC;
color: white;
}
.bg-div10 {
background-color: #F4B400;
color: #2E2E2E;
}
</style>
<script type="text/javascript" src="scripts/jquery.js"></script>
<div id="page">
<div id="page-preloader">
<div class="loader-main">
<div class="preload-spinner border-highlight"></div>
</div>
</div>
<div class="header header-fixed header-logo-center">
<a href="index.php" class="header-title"> شركة أيلا</a>
<a href="logout.php" data-toggle-theme-switch class="header-icon header-icon-4">خروج</a>
</div>
<?php include_once("footer-menu.php"); ?>
<div class="page-content header-clear-medium">
<div class="content-boxed">
<a href="#" class="footer-title bottom-10"><span class=" text-center color-black">خلاصة للطلبيات والمبالغ 😀</span></a>
<div class="content">
<div class="one-third first-column">
<a href="#">
<div data-height="80" class="bg-div10 caption shadow-huge bottom-20 ">
<div class="caption-center center-text">
<h1 class="center-text bold font-18" id="earning-last30">0,0</h1>
</div>
<div class="caption-bottom">
<p class="center-text color-black">٣٠ يوم</p>
</div>
<div class="caption-overlay color-black text-right " id="orders-last30"><i class="fas fa-box-open"></i></div>
</div>
</a>
</div>
<div class="one-third ">
<a href="#">
<div data-height="80" class="bg-div9 caption shadow-huge bottom-20 ">
<div class="caption-center">
<h1 class="center-text bolder font-18" id="earning-last7">0,0 </h1>
</div>
<div class="caption-bottom">
<p class="center-text color-white">٧ أيام</p>
</div>
<div class="caption-overlay text-right " id="orders-last7"><i class="fas fa-box-open" ></i></div>
</div>
</a>
</div>
<div class="one-third last-column">
<a href="#">
<div data-height="80" class="bg-div8 caption shadow-huge bottom-20 ">
<div class="caption-center">
<h1 class="center-text bolder font-18" id="earning-last1">0,0 </h1>
</div>
<div class="caption-bottom">
<p class="center-text color-black ">اليوم</p>
</div>
<div class="caption-overlay text-right " id="orders-last1"> <i class="fas fa-box-open"></i></div>
</div>
</a>
</div>
</div>
<span class="footer-title bottom-10">
<span class=" text-center color-black ">
كيف ممكن اساعدك. أختر
</span>
</span>
<div class="clear">
<!-- End of this section -->
<a href="orders.php">
<div data-instant-id="instant-1" data-height="120" class="bg-div1 caption caption-margins round-tiny shadow-huge bottom-10">
<div class="caption-center">
<h1 class="center-text bolder font-18"><i class="fas fa-list-alt fa-1x top-0 bottom-0 "></i> الطلبيات</h1>
<p class="center-text under-heading color-black">البحث و عرض الطلبيات</p>
</div>
<div class="caption-bottom">
<p class="center-text color-black ">اضافه طلبية</p>
</div>
<div class="caption-overlay"></div>
</div>
</a>
</div>
<div class="one-half">
<a href="returned.php">
<div data-instant-id="instant-2" data-height="120" class="bg-div1 caption caption-margins round-tiny shadow-huge">
<div class="caption-center">
<h1 class="center-text bolder font-18"><i class="fas fa-times-circle fa-1x top-0 bottom-0 "></i> الرواجع</h1>
<p class="center-text color-black under-heading"> كشوفات بالطلبيات الراجعه </p>
</div>
<div class="caption-bottom">
<p class="center-text color-black">انقر للعرض</p>
<p class="center-text color-black "></p>
</div>
<div class="caption-overlay "></div>
</div>
</a>
</div>
<div class="one-half last-column">
<a href="earnings.php">
<div data-instant-id="instant-4" data-height="120" class="bg-div1 caption caption-margins round-tiny shadow-huge ">
<div class="caption-center">
<h1 class="center-text bolder font-18"><i class="fas fa-coins fa-1x top-0 bottom-0"> </i> كشوفات </h1>
<p class="center-text color-black under-heading">كشوفات بالطلبات المستلمة</p>
</div>
<div class="caption-bottom">
<p class="center-text color-black ">انقر للعرض</p>
<p class="center-text "></p>
</div>
<div class="caption-overlay "></div>
</div>
</a>
</div>
<div class="clear last-column">
<a href="charts.php">
<div data-instant-id="instant-5" data-height="120" class="bg-div1 caption caption-margins round-tiny shadow-huge bottom-10">
<div class="caption-center">
<h1 class="center-text bolder font-18"><i class="fas fa-chart-pie fa-1x top-0 bottom-0 "></i> احصائيات</h1>
<p class="center-text color-black under-heading">تقرير أحصائي للعميل</p>
</div>
<div class="caption-bottom">
<p class="center-text color-black ">انقر للعرض</p>
<p class="center-text "></p>
</div>
<div class="caption-overlay "></div>
</div>
</a>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="scripts/plugins.js"></script>
<script type="text/javascript" src="scripts/custom.js"></script>
<script type="text/javascript" src="scripts/toast.js"></script>
<script type="text/javascript">
function static(){
$.ajax({
url:"php/_static.php",
type:"POST",
data:$("#searchForm").serialize(),
success:function(res){
console.log(res);
$.each(res.last1,function(){
if(this.client_price != null){
$("#earning-last1").text(this.client_price);
}
if(this.orders != null){
$("#orders-last1").append(" "+this.orders);
}
});
$.each(res.last7,function(){
if(this.client_price != null){
$("#earning-last7").text(this.client_price);
}
if(this.orders != null){
$("#orders-last7").append(" "+this.orders);
}
});
$.each(res.last30,function(){
if(this.client_price != null){
$("#earning-last30").text(this.client_price);
}
if(this.orders != null){
$("#orders-last30").append(" "+this.orders);
}
});
},
error:function(e){
console.log(e);
}
});
}
static();
</script>
<!-- Firebase App (the core Firebase SDK) is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/7.12.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.12.0/firebase-messaging.js"></script>
<!-- If you enabled Analytics in your project, add the Firebase SDK for Analytics -->
<!--<script src="https://www.gstatic.com/firebasejs/7.12.0/firebase-analytics.js"></script>
-->
<!-- Add Firebase products that you want to use -->
<script src="https://www.gstatic.com/firebasejs/7.12.0/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.12.0/firebase-firestore.js"></script>
<script>
// Your web app's Firebase configuration
var firebaseConfig = {
apiKey: "AIzaSyCmIr87Ihp8nXtHrKWZyeH1GcvFrHxmtJw",
authDomain: "alnahr-3a32e.firebaseapp.com",
databaseURL: "https://alnahr-3a32e.firebaseio.com",
projectId: "alnahr-3a32e",
storageBucket: "alnahr-3a32e.appspot.com",
messagingSenderId: "410160983978",
appId: "1:410160983978:web:22a64081a20724ec9185d3",
measurementId: "G-QYSFSMTB8R"
};
// Initialize Firebase
// Initialize Firebase
if (firebase.messaging.isSupported()) {
firebase.initializeApp(firebaseConfig);
// firebase.analytics();
const messaging = firebase.messaging();
navigator.serviceWorker.register('scripts/firebase-sw.js')
.then((registration) => {
messaging.useServiceWorker(registration);
messaging.requestPermission()
.then(function() {
console.log(messaging.getToken());
return messaging.getToken();
})
.then(function(token) {
console.log(token);
updateUserToken(token);
})
.catch(function(err) {
console.log("error")
});
messaging.onMessage(function(payload) {
console.log('On message', payload);
Toast.success(payload.notification.title,payload.notification.body);
});
});
}else{
Notification.requestPermission().then(function(result) {
console.log(Notification.getToken());
});
}
function updateUserToken(token){
$.ajax({
url:"php/_updateToken.php",
data:{token : token},
type:"POST",
success:function(res){
console.log(res);
},
error:function(e){
console.log(e);
},
});
}
</script>
</body>
</html>