-
Notifications
You must be signed in to change notification settings - Fork 0
/
index2.php
104 lines (96 loc) · 1.98 KB
/
index2.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
<?php
function getdata($v1,$v2){
$csv = array_map('str_getcsv', file('sample-data.csv'));
usort($csv, function($a,$b){
$output= strcasecmp($a[0], $b[0]);
if ($output == 0) {
return 0;
}
if($output > 0){
return 1;
}
if ($output < 0) {
return -1;
}
});
foreach ($csv as $key => $value) {
if(substr($value[0],0,1)===$v1 || substr($value[0],0,1)===$v2){
echo '<a href="'.$value[1].'" title="'.$value[0].'" target="_blank">
<img src="'.$value[2].'" alt="'.$value[0].'">
</a>';
}
}
}
?>
<html>
<head><title>Sample</title>
<link rel="stylesheet" href="http://www.blackpepper.co.nz/test-stylesheet/1463372307" /></head>
<body>
<!--
_
\`*-.
) _`-.
. : `. .
: _ ' \
; *` _. `*-._
`-.-' `-.
; ` `.
:. . \
. \ . : .-' .
' `+.; ; ' :
: ' | ; ;-.
; ' : :`-: _.`* ;
*' / .*' ; .*`- +' `*'
*-* `*-* `*-*'
-->
<header>
<a href="http://www.blackpepper.co.nz/"><img src="http://www.blackpepper.co.nz/images/logo1.png"></a></a>
</header>
<main>
<div class="set"><div class="pad"><h2>A - B</h2>
<?php
getdata($v1='A',$v2='B');
?>
</div></div>
<div class="set"><div class="pad"><h2>C - D</h2>
<?php
getdata($v1='C',$v2='D');
?>
</div></div>
<div class="set"><div class="pad"><h2>E - F</h2>
<?php
getdata($v1='E',$v2='F');
?>
</div></div>
<div class="set"><div class="pad"><h2>G - H</h2>
<?php
getdata($v1='G',$v2='H');
?>
</div></div>
<div class="set"><div class="pad"><h2>K - L</h2>
<?php
getdata($v1='K',$v2='L');
?>
</div></div>
<div class="set"><div class="pad"><h2>M - N</h2>
<?php
getdata($v1='M',$v2='N');
?>
</div></div>
<div class="set"><div class="pad"><h2>O - P</h2>
<?php
getdata($v1='O',$v2='P');
?>
</div></div>
<div class="set"><div class="pad"><h2>Q - R</h2>
<?php
getdata($v1='Q',$v2='R');
?>
</div></div>
<div class="set"><div class="pad"><h2>S - T</h2>
<?php
getdata($v1='S',$v2='T');
?>
</div></div>
</main>
</html>