-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
158 lines (153 loc) · 7.77 KB
/
Copy pathindex.php
File metadata and controls
158 lines (153 loc) · 7.77 KB
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
<?php
$timezone = "Asia/Tehran";
date_default_timezone_set($timezone);
include 'core.php'
?>
<!DOCTYPE html>
<html dir="rtl">
<head>
<title>Epic reader</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="assets/css/uikit-rtl.min.css" />
<script src="assets/js/uikit.min.js"></script>
<script src="assets/js/uikit-icons.min.js"></script>
<script src="https://unpkg.com/ionicons@5.2.3/dist/ionicons.js"></script>
<style>
@font-face {
font-family: "Vazir";
src: url("assets/fonts/Vazir-Light.eot");
src: url("assets/fonts/Vazir-Light?#iefix") format("embedded-opentype"), url("assets/fonts/Vazir-Light.woff") format("woff"), url("assets/fonts/Vazir-Light.ttf") format("truetype");
font-weight: normal;
}
@font-face {
font-family: "Vazir-bold";
src: url("assets/fonts/Vazir-Bold.eot");
src: url("assets/fonts/Vazir-Bold.eot?#iefix") format("embedded-opentype"), url("assets/fonts/Vazir-Bold.ttf") format("truetype");
font-weight: bold;
}
@font-face {
font-family: "Vazir-medium";
src: url("assets/fonts/Vazir-Medium.eot");
src: url("assets/fonts/Vazir-Medium.eot?#iefix") format("embedded-opentype"), url("assets/fonts/Vazir-Medium.ttf") format("truetype");
font-weight: 200;
}
* {
font-family: 'Vazir';
color: #2c3e50;
}
body {
/* background: url('https://www.teahub.io/photos/full/111-1110876_spotify-wallpaper.jpg');
background-repeat: no-repeat;
background-position: center; */
background: #34495e;
min-height: 100vh;
}
table tbody tr td {
padding: 3px !important;
}
#root-container {
}
.opacity-90 {
background: rgb(255 255 255 / 90%)
}
.blink {
animation: blinker 1.5s cubic-bezier(.5, 0, 1, 1) infinite alternate;
color: #e74c3c;
}
@keyframes blinker {
from { opacity: 1; }
to { opacity: 0; }
}
.favicon {
max-width: 15px;
margin-left: 5px;
}
</style>
</head>
<body>
<div id="root-container" class="uk-container uk-container-medium uk-margin-auto uk-padding-large">
<div class="uk-card uk-card-default uk-card-large uk-card-body uk-width-1-1@m uk-border-rounded opacity-90">
<ul uk-tab>
<li><a class="uk-text-bold" href="#">اقتصادی</a></li>
<li><a class="uk-text-bold" href="#">سیاسی</a></li>
<li><a class="uk-text-bold" href="#">حوادث</a></li>
</ul>
<ul class="uk-switcher uk-margin">
<li>
<div class="uk-overflow-auto">
<table class="uk-table uk-table-divider uk-table-justify">
<!-- <caption>آخرین اخبار اقتصادی</caption> -->
<!--
<thead>
<tr>
<th>Table Heading</th>
<th>Table Heading</th>
<th>Table Heading</th>
<th>Table Heading</th>
</tr>
</thead>
<tfoot>
<tr>
<td>Table Footer</td>
<td>Table Footer</td>
<td>Table Footer</td>
<td>Table Footer</td>
</tr>
</tfoot>
-->
<tbody>
<?php
$counter = 0;
foreach ($op as $timestamp => $item):
if (++$counter == 26) break;
?>
<?php
$timestamp_to_date = date('Y/d/m H:i:s', $item['timestamp']);
$date_part = explode(' ', $timestamp_to_date);
$date_part = explode('/', $date_part[0]);
$jYear = $date_part[0];
$jMonth = $date_part[1];
$jDay = $date_part[2];
$date = gregorian_to_jalali($jYear, $jMonth, $jDay, '-');
$en = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
$fa = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'];
$date = str_replace($en, $fa, $date);
$favicon = '';
if ($item['src'] == 'گسترشنیوز') {
$favicon = 'assets/images/fav/gostaresh.png';
}
if ($item['src'] == 'اقتصاد آنلاین') {
$favicon = 'assets/images/fav/eghtesadonline.ico';
}
if ($item['src'] == 'اقتصاد نیوز') {
$favicon = 'assets/images/fav/eghtesadnews.ico';
}
if ($item['src'] == 'تسنیم') {
$favicon = 'assets/images/fav/tasnim.ico';
}
if ($item['src'] == 'مشرق') {
$favicon = 'assets/images/fav/mashregh.ico';
}
if ($item['src'] == 'پندار آنلاین') {
$favicon = 'assets/images/fav/pendaronline.png';
}
?>
<tr>
<td class="uk-table-shrink"><ion-icon name="ellipse-outline" class="blink"></ion-icon></td>
<td class="uk-table-expand"><a class="uk-link-reset" href="<?php echo $item['url']; ?>" target="_blank"><?php echo $item['title']; ?></a></td>
<td class="uk-table-expand"><img class="favicon" src="<?php echo $favicon; ?>" alt=""><?php echo $item['src']; ?></td>
<td class="uk-table-expand"><?php echo $date; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</li>
<li>دیتاست آماده نشده است.</li>
<li>دیتاست آماده نشده است.</li>
</ul>
</div>
</div>
</body>
</html>