Location: PHPKode > projects > SENAYAN Library Automation > senayan3-stable5/index.php
<?php
/**
 * SENAYAN application bootstrap files
 *
 * Copyright (C) 2007,2008  Arie Nugraha (hide@address.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */

// required file
require 'sysconfig.inc.php';
require SIMBIO_BASE_DIR.'simbio_GUI/template_parser/simbio_template_parser.inc.php';

// create the template object
$template = new simbio_template_parser($sysconf['template']['dir'].'/'.$sysconf['template']['theme'].'/index_template.html');
// page title
$page_title = $sysconf['library_name'].' :: OPAC';
// default library info
$info = lang_opac_info;
// total opac result page
$total_pages = 1;

// start the output buffering for main content
ob_start();
require 'lib/contents/common.inc.php';
if (isset($_GET['p'])) {
    $path = trim($_GET['p']);
    // check if the file exists
    if (file_exists('lib/contents/'.$path.'.inc.php')) {
        include 'lib/contents/'.$path.'.inc.php';
    } else {
        include 'lib/contents/default.inc.php';
    }
} else {
    include 'lib/contents/default.inc.php';
}
// main content grab
$main_content = ob_get_clean();

// assign content to markers
$template->assign('<!--PAGE_TITLE-->', strip_tags($page_title));
$template->assign('<!--CSS-->', $sysconf['template']['css']);
$template->assign('<!--INFO-->', $info);
$template->assign('<!--LIBRARY_NAME-->', $sysconf['library_name']);
$template->assign('<!--LOCATION_LIST-->', $location_list);
$template->assign('<!--LANGUAGE_SELECT-->', $language_select);
$template->assign('<!--ADVSEARCH_AUTHOR-->', $advsearch_author);
$template->assign('<!--ADVSEARCH_TOPIC-->', $advsearch_topic);
$template->assign('<!--MAIN_CONTENT-->', $main_content);

// print out the template
$template->printOut();
?>
Return current item: SENAYAN Library Automation