forked from glycojones/ccp4-summer-school
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmaterial.php
More file actions
39 lines (35 loc) · 1.18 KB
/
material.php
File metadata and controls
39 lines (35 loc) · 1.18 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
<!doctype html>
<html>
<head>
<title>DLS-CCP4 Workshop</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="styles/ccp4.css" />
</head>
<body>
<?PHP include("includes/banner.php"); ?>
<main>
<h2 style="clear:both">Lecture and workshop slides</h2>
<?PHP
selectFiles("2023");
/////////////////////////////////////////////////////
// Function to display all files as table of links //
/////////////////////////////////////////////////////
function selectFiles($check)
{
echo "<table>\n";
$rtnArray = scandir("course_material", 0);
$numFiles = count($rtnArray);
for ($i = 0; $i < $numFiles; $i++) {
if (strstr($rtnArray[$i], $check) != FALSE) {
$fileArray = explode("/", $rtnArray[$i]);
$descArray = explode(".", $fileArray[1]);
echo "<tr><td><font size=\"+1\"><a class=darklink href=\"course_material/" . $rtnArray[$i] . "\">" . $rtnArray[$i] . "</a></font></td></tr>\n";
}
}
echo "</table>\n";
}
?>
</main>
<?PHP include("includes/sponsors.php"); ?>
</body>
</html>