/booka/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/booka/trunk
1 by Gustav Hartvigsson
initial code...
1
<?php
2
session_start();
3
4
$formdata = $_POST;
5
$passwordFile = "./cfg/adminpassword.md5";
6
$usernameFile = "./cfg/adminusername.u";
7
$sitenameFile = "./cfg/sitename.u";
8
$sitename = fopen($sitenameFile,r);
9
include "./inc/dbConnect.php";
10
11
include "./inc/head.php";
12
13
	
14
	echo "<h1> " . fgets($sitename) . " </h1> \n";
15
	
16
	if(file_exists("./cfg/hasrun.lock") == false){
17
		
18
		echo "<p>The site is not configured. <br />
19
		if you want to configure the site go to the <a href='./firstrun.php'> First Run Page</a> </p> \n";
20
		
21
	}else {
22
		if($_SESSION[Login] == true){
23
			
24
			echo "<div class='menu' >You are loged in <br /> ";
25
			echo '<form action="logout.php"><p> 
26
				<input type="submit" value="logout" />
27
				</p></form>
28
				</div>
29
				';
30
			
31
			$result=$db->query("SELECT * FROM booking");
32
			
33
			echo "<p>current database structure:</p>\n";
34
			while($result->valid()){
35
				
36
				$row = $result->current();
37
				
38
				echo "<div id=DB>" . $row . "</div>";
39
				
40
				$result->next();
41
			}
42
			
43
			echo "<p>go to <a href='./dbEditor.php'>db Editor! </a></p> \n";
44
			
45
		}else{
46
			include "./inc/login.html";
47
		}
48
	}
49
	
50
include "./inc/foot.php";
51
?>