This repository was archived by the owner on Aug 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtop.php
64 lines (53 loc) · 2.13 KB
/
top.php
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* This file is part of the Achievo ATK distribution.
* Detailed copyright and licensing information can be found
* in the doc/COPYRIGHT and doc/LICENSE files which should be
* included in the distribution.
*
* This file is the skeleton top frame file, which you can copy
* to your application dir and modify if necessary. By default,
* it displays the currently logged-in user and a logout link.
*
* @package atk
* @subpackage skel
*
* @author Ivo Jansch <[email protected]>
*
* @copyright (c)2000-2004 Ibuildings.nl BV
* @license http://www.achievo.org/atk/licensing ATK Open Source License
*
* @version $Revision: 5719 $
* $Id: top.php 5719 2007-05-04 13:34:51Z ivo $
*/
/**
* @internal includes.
*/
$config_atkroot = "./";
include_once("atk.inc");
atksession();
atksecure();
$page = &atknew("atk.ui.atkpage");
$ui = &atkinstance("atk.ui.atkui");
$theme = &atkTheme::getInstance();
$output = &atkOutput::getInstance();
$page->register_style($theme->stylePath("style.css"));
$page->register_stylecode("form{display: inline;}");
$page->register_style($theme->stylePath("top.css"));
//Backwards compatible $content, that is what will render when the box.tpl is used instead of a top.tpl
$loggedin = atktext("logged_in_as", "", "atk").": <b>".$g_user["name"]."</b>";
$content = '<br>'.$loggedin.' <a href="app.php?atklogout=1" target="_top">'.ucfirst(atktext("logout")).' </a> <br/><br/>';
$top = $ui->renderBox(array("content"=> $content,
"logintext" => atktext("logged_in_as"),
"logouttext" => ucfirst(atktext("logout", "", "atk")),
"logoutlink" => "app.php?atklogout=1",
"logouttarget"=>"_top",
"centerpiece"=>"",
"searchpiece"=>"",
"title" => atktext("app_title"),
"user" => $g_user["name"]),
"top");
$page->addContent($top);
$output->output($page->render(atktext('app_title'), true));
$output->outputFlush();
?>