示例#1
0
function show_notification_window($content, $closebutton = true, $windowtitle = "")
{
    if (!$windowtitle) {
        $windowtitle = atktext('notice');
    }
    $content .= '<br>';
    if ($closebutton == true) {
        $buttonlink = 'true';
    }
    $page =& atknew("atk.ui.atkpage");
    $ui =& atkinstance("atk.ui.atkui");
    $output =& atkOutput::getInstance();
    $page->register_style($ui->stylePath("style.css"));
    $res = $ui->renderBox(array("closebutton" => $buttonlink, "content" => $content), "error");
    $page->addContent($res);
    $output->output($page->render($windowtitle));
    $output->outputFlush();
}
示例#2
0
// check autorefresh call
if (atkConfig::getGlobal('session_autorefresh') && array_key_exists(atkConfig::getGlobal('session_autorefresh_key'), $_GET)) {
    die(session_id());
}
atksecure();
$theme =& atkinstance('atk.ui.atktheme');
if (atkconfig("fullscreen")) {
    // Fullscreen mode. Use index.php as launcher, and launch app.php fullscreen.
    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_script(atkconfig("atkroot") . "atk/javascript/launcher.js");
    $content = '<script language="javascript">atkLaunchApp(); </script>';
    $content .= '<br><br><a href="#" onClick="atkLaunchApp()">' . atktext('app_reopen') . '</a> &nbsp; ' . '<a href="#" onClick="window.close()">' . atktext('app_close') . '</a><br><br>';
    $box = $ui->renderBox(array("title" => atktext("app_launcher"), "content" => $content));
    $page->addContent($box);
    $output->output($page->render(atktext('app_launcher'), true));
    $output->outputFlush();
} else {
    if ($theme->getAttribute('useframes', true)) {
        // Regular mode. app.php can be included directly.
        include "app.php";
    } else {
        $indexpage =& atknew('atk.ui.atkindexpage');
        $indexpage->generate();
    }
}
示例#3
0
文件: dispatch.php 项目: dgangal/atk
 * @license http://www.achievo.org/atk/licensing ATK Open Source License
 *
 * @version $Revision: 6083 $
 * $Id$
 */
/**
 * @internal Setup the system
 */
$config_atkroot = "./";
include_once "atk.inc";
atksession();
$session =& atkSessionManager::getSession();
$output =& atkOutput::getInstance();
if ($ATK_VARS["atknodetype"] == "" || $session["login"] != 1) {
    // no nodetype passed, or session expired
    $page =& atknew("atk.ui.atkpage");
    $ui =& atkinstance("atk.ui.atkui");
    $theme =& atkTheme::getInstance();
    $page->register_style($theme->stylePath("style.css"));
    $destination = "index.php?atklogout=true";
    if (isset($ATK_VARS["atknodetype"]) && isset($ATK_VARS["atkaction"])) {
        $destination .= "&atknodetype=" . $ATK_VARS["atknodetype"] . "&atkaction=" . $ATK_VARS["atkaction"];
        if (isset($ATK_VARS["atkselector"])) {
            $destination .= "&atkselector=" . $ATK_VARS["atkselector"];
        }
    }
    $title = atktext("title_session_expired");
    $contenttpl = '<br>%s<br><br><input type="button" onclick="top.location=\'%s\';" value="%s"><br><br>';
    $content = sprintf($contenttpl, atktext("explain_session_expired"), str_replace("'", "\\'", $destination), atktext("relogin"));
    $box = $ui->renderBox(array("title" => $title, "content" => $content));
    $page->addContent($box);
示例#4
0
文件: test.php 项目: rezaul101/erp32
 * subfolders. In advance to using this file, the config variables
 * whithin this file must be adjusted.
 *
 * @package achievo
 *
 * @author guido <*****@*****.**>
 *
 * @copyright (c) 2005 Ibuildings.nl BV
 * @license http://www.gnu.org/copyleft/gpl.html  GNU General Public License 2
 *
 * @version $Revision: 2271 $
 * $Id: test.php 2271 2007-06-27 06:17:18Z guido $
 */
/**
 * @internal includes 
 */
$config_atkroot = "./";
include_once "atk.inc";
// Start session
atksession();
// Require ATK authentication if not running in text mode
if (PHP_SAPI != "cli") {
    atksecure();
}
// Set the maximum execution time of all tests together
set_time_limit(atkconfig("test_maxexecutiontime"));
// Include the Achievo extended webtestcase (features loginAchievo function)
atkimport("test.achievowebtestcase");
// Let the atktestsuite run the requested tests in an appropriate format
$suite =& atknew("atk.test.atktestsuite");
$suite->run(PHP_SAPI != "cli" ? "html" : "text", atkArrayNvl($_REQUEST, "atkmodule"));