-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdivisions_menu.php
64 lines (51 loc) · 1.58 KB
/
divisions_menu.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
<?php
$title="Snr Divisions";
$back="index.php";
include("head.php");
$dir = new RecursiveDirectoryIterator("../".$season);
$filename_array = array();
foreach(new RecursiveIteratorIterator($dir) as $file) {
$file_desc=ucwords(str_replace("_", " ",substr($file->getFilename(), 0, -4)));
$file_desc=str_replace("Div", "Division ",$file_desc);
if ($file->IsFile() &&
(strpos($file, "mens") || strpos($file, "mixed") || strpos($file, "ladies")))
{
$temp=str_replace("_", " ",substr($file->getFilename(), 0, -4));
$temp=str_replace(" all", " all",$temp);
$filename_array[]=ucwords(str_replace(" prem", " prem",$temp));
}
}
$last="";
sort($filename_array);
echo '<ul class="rounded">';
foreach($filename_array as $file) {
$name=str_replace(" Prem", " Premier",$file);
$file=str_replace(" Prem", " Prem",$file);
$check=str_replace(" All", " Skip",$file);
if ($check==$file)
{
if ((substr(strtolower($file), 0, 6) == "ladies") && $last <> "ladies")
{
$last="ladies";
}
if ((substr(strtolower($file), 0, 4) == "mens") && $last <> "mens")
{
$last="mens";
echo '</ul><ul class="rounded">';
}
if ((substr(strtolower($file), 0, 5) == "mixed") && $last <> "mixed")
{
$last="mixed";
echo '</ul><ul class="rounded">';
}
echo '<li><a href="division_tables.php?dnm=';
echo str_replace(" ", "_",strtolower($file));
echo '" target="_webapp">';
echo str_replace("Div", "Division ",$name);
echo '</a></li>';
echo "\n";
}
}
echo '</ul>';
include("foot.php");
?>