index.php 1.3 KB
Newer Older
1 2 3 4
<?php
/**
 * Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
 *
Ghislain Loas's avatar
Ghislain Loas committed
5
 * BOKEH is free software; you can redistribute it and/or modify
6 7 8 9 10 11
 * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
 * the Free Software Foundation.
 *
 * There are special exceptions to the terms and conditions of the AGPL as it
 * is applied to this software (see README file).
 *
Laurent's avatar
Laurent committed
12
 * BOKEH is distributed in the hope that it will be useful,
13 14 15 16 17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 *
 * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
Laurent's avatar
Laurent committed
18
 * along with BOKEH; if not, write to the Free Software
19
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
20
 */
21 22 23

// Run Bokeh installer if not configured
if ((!file_exists('local.php') || !file_exists('config.ini') || !file_exists('cosmogramme/config.php')) 	&& file_exists('scripts/install-bokeh.php')) {
Ghislain Loas's avatar
Ghislain Loas committed
24
  include('scripts/install-bokeh.php');
25
}
26

27 28
require('includes.php');

29
try {
30 31
  require_once(__DIR__ . '/library/Class/UserAgent.php');
	if ((new Class_UserAgent())->isBotAndNotAllowed())
32 33 34 35 36 37 38 39
		exit;

	setupOpac()->dispatch();
} catch(Exception $e) {
	echo $e->getMessage();
}

?>