Location: PHPKode > projects > PHPture > phpture/index.php
<?php

header('Content-Type: text/html; charset=UTF-8');

$browser = 'browser.php';

if(isset($_GET['q'])) {
	
	$browser .= '?q='.trim($_GET['q']);
}

require_once('conf.php');

try {
	$db = new PDO('sqlite:'.DATABASE_PATH);
} catch(PDOException $exception) {
	
	echo('<h1>Unable to open database.</h1>');
	
	echo('<p>The following error message was returned when trying to connect to the SQLite database at <b>'.DATABASE_PATH.'</b></p>');
	
	echo('<code>'.htmlspecialchars($exception->getMessage()).'</code>');
	
	echo('<p>The cause of this problem is most likely that you have not set permissions of you Aperture Library. Please read the <a href="http://phpture.sourceforge.net/manual/install">Installation manual of PHPture</a> for instructions.</p>');
	
	exit();
}

?><!DOCTYPE html>
<html>
<head>
<title>PHPture</title>
<link rel="shortcut icon" href="favicon.png">
<link rel="search" type="application/opensearchdescription+xml"
title="PHPture" href="opensearch.php" />
</head>
<!-- Frame can't be name "toolbar" because Apple Safari 3.1.2 fucks up JavaScript calls to frames with that name, renamed to toolbar2 instead. -->
<frameset rows="30,*" frameborder="1" border="5">
	<frame src="toolbar.html" name="toolbar2" noresize="noresize" scrolling="no">
	<frameset cols="240,*,200" id="sidebarSet">
		<frame src="projects.php" name="sidebar">
		<frameset rows="*,220" id="browserSet" border="5">
			<frame src="viewer.html" name="viewer">
			<frame src="<?php echo($browser); ?>" name="browser">
		</frameset>	
		<frame src="info.php" name="info">
	</frameset>
</frameset>
</html>
Return current item: PHPture