-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
42 lines (40 loc) · 945 Bytes
/
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
$x = file_get_contents("./dot.ini");
$j = parse_ini_string($x,true);
if(!$time=@$j['.meta']['time'])
{
$time = @$_GET['time'] ?: time();
}
if(strpos($x,".meta")>0) {
// list($top, $junk) = explode("[.meta]",$x);
// $x = $top;
$img = @$j['.meta']['project'] ?: "sample";
} else {
$x .= "\n[.meta]\nproject=sample";
$img = "sample";
}
$image = "";
if(file_exists("./$img.png")) {
$image = "./$img.png";
}
?>
<html>
<form method="post" action="post.php">
<textarea name="data" rows="20" cols="80">
<?=$x;?>
</textarea>
<br/>
<input type="submit" value="Post"/>
</form>
<form method='post' action='files.php'>
<label><input type="checkbox" name="foreignkeys" value="yes">
Include explicit foreign keys in migrations
</label>
<input type="submit" value="Generate models and migrations"/>
</form>
<?php if($image!="") { ?>
<img src="<?=$image;?>?time=<?=$time;?>"/>
<?php } else { ?>
No image exists yet
<?php } ?>
</html>