<?php

require "constants.php";
require "config.php";
require "functions.php";

require "class_appdb.php";
require "class_user.php";
require "class_album.php";
require "class_image.php";
require "class_link.php";

$globaldbh = AppDB::getDBH();
if ( !is_object($globaldbh) || !(get_class($globaldbh) == "PDO") ) {
   header('Location: error_db.php?establish=');
   exit();
}

if ( php_sapi_name() != "cli" ) {
   require 'startsession.php';
}

$currentuser = new User($_SESSION['userid']);
