/booka/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/booka/trunk
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
<?php
session_start();

$formdata = $_POST;
$passwordFile = "./cfg/adminpassword.md5";
$usernameFile = "./cfg/adminusername.u";
$sitenameFile = "./cfg/sitename.u";
$sitename = fopen($sitenameFile,r);
include "./inc/dbConnect.php";

include "./inc/head.php";

	
	echo "<h1> " . fgets($sitename) . " </h1> \n";
	
	if(file_exists("./cfg/hasrun.lock") == false){
		
		echo "<p>The site is not configured. <br />
		if you want to configure the site go to the <a href='./firstrun.php'> First Run Page</a> </p> \n";
		
	}else {
		if($_SESSION[Login] == true){
			
			echo "<div class='menu' >You are loged in <br /> ";
			echo '<form action="logout.php"><p> 
				<input type="submit" value="logout" />
				</p></form>
				</div>
				';
			
			$result=$db->query("SELECT * FROM booking");
			
			echo "<p>current database structure:</p>\n";
			while($result->valid()){
				
				$row = $result->current();
				
				echo "<div id=DB>" . $row . "</div>";
				
				$result->next();
			}
			
			echo "<p>go to <a href='./dbEditor.php'>db Editor! </a></p> \n";
			
		}else{
			include "./inc/login.html";
		}
	}
	
include "./inc/foot.php";
?>