<?php
// +--------------------------------------------+
// | Twiggi web-based groupware. |
// | |
// | For copyright and license information |
// | please read the COPYRIGHT file. |
// +--------------------------------------------+
$slash = DIRECTORY_SEPARATOR;
$root = dirname(__FILE__);
$startup = $root.$slash."core".$slash."startup.inc.php";
if (!file_exists($startup))
{
die ("FATAL ERROR: Twiggi 2 installation incomplete.");
}
require_once($startup);
$languages = array();
$core = catalog::get_core();
$database = catalog::get_database();
if ($database != NULL)
{
$conn = $database->get_connection_fetch_assoc();
$result = $conn->Execute("SELECT language FROM twiggi2_languages");
if ($result && ($result->RecordCount() > 0))
{
while(!$result->EOF)
{
$languages[] = $result->FetchRow();
}
}
}
$template = catalog::get_template();
$template->load_template_style("default");
$template->load_template_page("hello_world");
$template->add("Title","Twiggi says");
$template->add("Hello_world","Hello World!!!");
$template->add("Version_label","Version: ");
$template->add("Version_text",$core->get_version());
$template->add("No_items","No items found");
$template->add("Available_languages_label","Available languages in the database:");
$template->add("Available_languages",$languages);
$template->show();
?>