-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
41 lines (41 loc) · 1.11 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
<?php
// headers here
// then common stuff
require_once 'parse_config.php';
require_once 'internal_or_external.php';
?><!DOCTYPE html>
<html>
<head>
<?php // include mobile zoom meta tags
readfile( "zoom.html" )
?>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<?php
print "Remote host '$_SERVER[REMOTE_ADDR]' is probably "
. ($internal ? '' : 'not')
. " internal";
if( $internal ){
print "<div id='newcontainer'>Create a new container: "
. "<form action='create.php'>"
. "<input type='hidden' name='container' value='/'>"
. "<input type='text' name='new' value='new'>"
. "<input type='submit' value='Create'>"
. "</form></div>";
}
if( ! $containers = opendir( $config->image_base ) ){
die( "Error opening base dir" );
}
while( false !== ($container = readdir($containers)) ){
if( $container == '.' or $container == '..' ){
continue;
}
print "<div class='container'>
Container: <a class='container' href='container.php?container="
. urlencode($container)
. "'>$container</a></div>\n";
}
?>
</body>
</html>