[go: up one dir, main page]

Menu

[r8]: / trunk / index.php  Maximize  Restore  History

Download this file

51 lines (42 with data), 1.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?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();
?>