-
Notifications
You must be signed in to change notification settings - Fork 0
/
table.php
68 lines (66 loc) · 1.54 KB
/
table.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
<style>
table{
width:100%;
height:800px;
display: table;
table-layout: fixed;
overflow-wrap: break-word;
background-color: white;
}
.highlight-container, .highlight {
position: relative;
}
.highlight-container {
display: inline-block;
}
.highlight-container:before, .highlight-container:after {
content: " ";
display: block;
height: 90%;
width: 100%;
margin-left: -3px;
margin-right: -3px;
position: absolute;
}
.highlight-container:before {
background: rgba(255, 0, 0, 0.9);
transform: rotate(2deg);
top: -1px;
left: -1px;
}
.highlight-container:after {
background: rgba(255, 0, 0, 0.6);
top: 3px;
right: -2px;
}
.highlight-container .highlight {
color: #333;
z-index: 4;
}
</style>
<?php
date_default_timezone_set('Europe/Madrid');
include("names.php");
if (file_exists("names.json")){
$array_names = json_decode(file_get_contents("names.json"),true);
}else{
$array_names = $names;
}
$array_names = call_user_func_array('array_merge', $array_names);
foreach ($array_names as $new_name=>$new_twitter){
$new_names[] = $new_name;
}
$division = ceil(count($names)/5);
echo '<table width="100%" align="center"><tr>';
$i = 0;
foreach ($names as $name){
if (in_array(key($name),$new_names)){
echo "<td>".key($name)."</td>";
}else{
echo "<td><span class=highlight-container><span class=highlight>".key($name)."</span></span></td>";
}
$i++;
if ($i % 5 == 0) { echo "</tr><tr>"; }
}
echo '</tr></table>';
?>