-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
78 lines (78 loc) · 1.67 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
<?php
include('header.php');
?>
<div class="frame">
<div class="menu">
<label class="ooc"><input id="ata" type="checkbox"> ATA Gene</label>
<ul>
<?php
$menu = [
[
'url' => 'security.php',
'kreoleac' => 'Ilukax',
'ancient' => 'Security',
],
[
'url' => 'rings.php',
'kreoleac' => 'Quanta Djendam',
'ancient' => 'Transportation Rings',
'latin' => 'Magic Rings',
],
[
'url' => 'stargate.php',
'kreoleac' => 'Raeshad Hadrash',
'ancient' => 'Astria Porta',
'latin' => 'Chappa\'ai'
],
[
'url' => 'scan.php',
'kreoleac' => 'Duplica Jikak',
'ancient' => 'Diagnostics',
'latin' => 'Deep look'
],
];
?>
<?php foreach ($menu as $item) : ?>
<li>
<a href="<?php echo $item['url']; ?>" target="display">
<?php translate($item); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<iframe name="display" src="<?php echo $menu[0]['url']; ?>"></iframe>
</div>
<script type="text/javascript">
function ata_toggle(enabled) {
if (enabled) {
jQuery('body').addClass('ancient');
jQuery('iframe').contents().find('body').addClass('ancient');
} else {
jQuery('body').removeClass('ancient');
jQuery('iframe').contents().find('body').removeClass('ancient');
}
}
function ata_on() {
return jQuery('#ata')[0].checked;
}
jQuery('#ata').on('change', function() {
ata_toggle(this.checked);
});
jQuery(document).on('keypress', function(event) {
console.log(event);
if ("!" == event.key) {
console.log('scan');
jQuery('iframe').attr('src', 'scan.php');
}
if ("@" == event.key) {
console.log('rings');
jQuery('iframe').attr('src', 'rings.php');
}
});
jQuery('iframe').on('load', function() {
ata_toggle(ata_on());
});
</script>
<?php
include('footer.php');