本文整理汇总了PHP中atkinstance函数的典型用法代码示例。如果您正苦于以下问题:PHP atkinstance函数的具体用法?PHP atkinstance怎么用?PHP atkinstance使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了atkinstance函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCenterPiece
function getCenterPiece(&$centerpiece, &$centerpiecelinks)
{
$user =& atkGetUser();
$theme =& atkinstance("atk.ui.atktheme");
// Set the dispatchfile for this menu based on the theme setting, or to the default if not set.
// This makes sure that all calls to dispatch_url will generate a url for the main frame and not
// within the menu itself.
$dispatcher = $theme->getAttribute('dispatcher', atkconfig("dispatcher", "index.php"));
// do not use atkSelf here!
$c =& atkinstance("atk.atkcontroller");
$c->setPhpFile($dispatcher);
if ($theme->getAttribute('useframes', true)) {
$target = 'target="main"';
} else {
$target = "";
}
//$centerpiece = $centerpiecelinks['pim'] = href(dispatch_url("dashboard.mainboard", "start"), atktext("pim"), SESSION_NEW, false,$target);
// change location link - if location_name is null there is only one location!
if ($user['location_id'] !== null) {
$current_location = atktext('current_location') . ': ' . $user['location_name'];
$atktarget = "index.php?atknodetype=locations.location&atkaction=change&atklevel=0&atkprevlevel=0&atkselect=[atkprimkey]";
$params = array("atkfilter" => $filter, "atktarget" => $atktarget);
$centerpiece = $centerpiecelinks['change_location'] = href(dispatch_url("locations.location", "select", $params), $current_location, SESSION_NEW, false, $target);
}
// if user settings is allowed put link to it
if (is_allowed("loginmanager.settings", "edit") && substr($user['name'], 0, 4) != 'demo') {
$centerpiece .= ' ';
$centerpiece .= $centerpiecelinks['userprefs'] = href(dispatch_url("loginmanager.settings", "edit"), atktext("userprefs"), SESSION_NEW, false, $target);
}
}
示例2: smarty_function_crmlastviewed
/**
* Class for managing activities
*
* @author Sandy Pleyte <sandy@achievo.org>
* @package achievo
* @subpackage crm
* @since 1.3.0
*/
function smarty_function_crmlastviewed($params, &$smarty)
{
$eventlog =& atkGetNode("crm.eventlog");
$userid = atkGetUserId();
$items = $eventlog->getRecentlyViewed($userid);
$theme =& atkinstance("atk.ui.atktheme");
$tpl = $theme->tplPath("crm_lastviewed.tpl");
if ($theme->tplPath("crm_lastviewed.tpl")) {
$ui =& atkinstance("atk.ui.atkui");
return $ui->render('crm_lastviewed.tpl', array("items" => $items));
}
return "no template ?";
}
示例3: show_notification_window
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();
}
示例4: atksession
*
* @copyright (c)2000-2004 Ibuildings.nl BV
* @license http://www.achievo.org/atk/licensing ATK Open Source License
*
* @version $Revision$
* $Id$
*/
/**
* @internal includes
*/
$config_atkroot = "./";
include_once "atk.inc";
atksession();
atksecure();
require "theme.inc";
atkimport("atk.ui.atktheme");
$output =& atkOutput::getInstance();
$page =& atkinstance("atk.ui.atkpage");
$page->unregister_all_scripts();
$theme =& atkTheme::getInstance();
$ui =& atkinstance("atk.ui.atkui");
/* general menu stuff */
/* load menu layout */
atkimport("atk.menu.atkmenu");
$menu =& atkMenu::getMenu();
if (is_object($menu)) {
$output->output($menu->render());
} else {
atkerror("no menu object created!");
}
$output->outputFlush();
示例5: smarty_function_atkthemeicon
/**
* Implements the {atkthemeimg} plugin for use in templates.
*
* The atkthemeicon plugin retrieves an icon path from the theme, while
* respecting inheritance within the theme. In other words, if
* a theme derives from the default theme, but does not define a
* new version of 'someimg.jpg', then {atkthemeimg someimg.jpg} will
* display the path to the default theme version of the same.
*
* Params:
* - name: the name of the icon to retrieve
* - type: the icon type (recordlist etc.)
*
* Example:
* <img src="{atkthemeicon name='delete' type='recordlist'}">
*
* @author Peter C. Verhage <peter@ibuildings.nl>
*
*/
function smarty_function_atkthemeicon($params, &$smarty)
{
$theme =& atkinstance("atk.ui.atktheme");
return $theme->iconPath($params['name'], $params['type']);
}
示例6: smarty_function_atkloadscript
/**
* Implements the {atkloadscript} plugin for use in templates.
*
* The atkloadscript plugin registers a javascript code in the current page
* to be used in the onLoad of the body.
*
* Params:
* 0/code The javascript code to load.
*
* Example:
* {atkscript "alert('Hello World!');"}
*
* @author Boy Baukema <boy@achievo.org>
*/
function smarty_function_atkloadscript($params)
{
$page =& atkinstance('atk.ui.atkpage');
$page->register_loadscript($params[0] ? $params[0] : $params['code']);
}
示例7: atktext
$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);
$output->output($page->render(atktext("title_session_expired"), true));
} else {
atksecure();
atkimport("atk.ui.atkpage");
$lockType = atkconfig("lock_type");
if (!empty($lockType)) {
atklock();
}
$flags = array_key_exists("atkpartial", $ATK_VARS) ? HTML_PARTIAL : HTML_STRICT;
//Load controller
if ($ATK_VARS["atkcontroller"] == "") {
$controller =& atkinstance("atk.atkcontroller");
} else {
$controller =& atkinstance($ATK_VARS["atkcontroller"]);
}
//Handle http request
$controller->dispatch($ATK_VARS, $flags);
}
$output->outputFlush();
示例8: atksession
* @internal includes
*/
$config_atkroot = "./";
include_once "atk.inc";
include_once "atk/atkbrowsertools.inc";
include_once "achievotools.inc";
atksession();
atksecure();
include "theme.inc";
$theme =& atkinstance('atk.ui.atktheme');
if (atkconfig("fullscreen")) {
// Fullscreen mode. Use index.php as launcher, and launch app.php fullscreen.
$page =& atkinstance("atk.ui.atkpage");
$ui =& atkinstance("atk.ui.atkui");
$theme =& atkinstance("atk.ui.atktheme");
$output =& atkinstance("atk.ui.atkoutput");
$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', "atk") . '</a> ' . '<a href="#" onClick="window.close()">' . atktext('app_close', "atk") . '</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 {
$user =& atkGetUser();
$indexpage =& atknew('atk.ui.atkindexpage');
示例9: smarty_function_atkdispatchfile
/**
* Returns the dispatch file.
*
* @author Sandy Pleyte <sandy@achievo.org>
*
*/
function smarty_function_atkdispatchfile($params, &$smarty)
{
$c =& atkinstance("atk.atkcontroller");
return $c->getPhpFile();
}
示例10: atksession
* included in the distribution.
*
* This file is the skeleton dispatcher file, which you can copy
* to your application dir and modify if necessary. By default, it
* checks the $atknodetype and $atkaction postvars and creates the
* node and dispatches the action.
*
* @package atk
* @subpackage skel
*
* @author Ivo Jansch <ivo@achievo.org>
*
* @copyright (c)2000-2004 Ivo Jansch
* @license http://www.achievo.org/atk/licensing ATK Open Source License
*
* @version $Revision: 2786 $
* $Id: debugger.php 6354 2009-04-15 02:41:21Z mvdam $
*/
/**
* @internal Setup the system
*/
$config_atkroot = "./";
include_once $config_atkroot . "atk/include/initial.inc";
atksession();
atksecure();
$debugger =& atkinstance("atk.utils.atkdebugger");
$output =& atkOutput::getInstance();
$output->output($debugger->renderConsole());
$config_debug = 0;
// force debugging off in console
$output->outputFlush();
示例11: atkinstance
<?php
atkPage::getInstance()->register_script(atkconfig('atkroot') . 'atk/javascript/overlibmws/overlibmws.js');
$theme = atkinstance("atk.ui.atktheme");
$image = $theme->imgPath("help");
$tooltip = atk_htmlentities(str_replace(array("\r\n", "\r", "\n"), ' ', $tooltip));
?>
<img align="top" src="<?php
echo $image;
?>
" border="0" style="margin-left: 3px;"
onmouseover="return overlib( & quot;<?php
echo $tooltip;
?>
& quot; , BGCLASS, 'overlib_bg', FGCLASS, 'overlib_fg', TEXTFONTCLASS, 'overlib_txt', WIDTH, 300);"
onmouseout="return nd();"/>
示例12: atksession
*/
/**
* @internal includes..
*/
$config_atkroot = "./";
include_once "atk.inc";
atksession();
atksecure();
$output = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">';
$output .= "\n<html>\n <head>\n";
$output .= ' <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=' . atkGetCharset() . '">';
$output .= "\n <title>" . atktext('app_title') . "</title>\n </head>\n";
atkimport("atk.menu.atkmenu");
atkimport("atk.utils.atkframeset");
$menu =& atkMenu::getMenu();
$theme =& atkinstance('atk.ui.atktheme');
$position = $menu->getPosition();
$scrolling = $menu->getScrollable() == MENU_SCROLLABLE ? FRAME_SCROLL_AUTO : FRAME_SCROLL_NO;
if (isset($ATK_VARS["atknodetype"]) && isset($ATK_VARS["atkaction"])) {
$destination = "dispatch.php?atknodetype=" . $ATK_VARS["atknodetype"] . "&atkaction=" . $ATK_VARS["atkaction"];
if (isset($ATK_VARS["atkselector"])) {
$destination .= "&atkselector=" . $ATK_VARS["atkselector"];
}
} else {
$destination = "welcome.php";
}
$frame_top_height = $theme->getAttribute('frame_top_height');
$frame_menu_width = $theme->getAttribute('frame_menu_width');
$topframe =& new atkFrame($frame_top_height ? $frame_top_height : "75", "top", "top.php", FRAME_SCROLL_NO, true);
$mainframe =& new atkFrame("*", "main", $destination, FRAME_SCROLL_AUTO, true);
$menuframe =& new atkFrame($position == MENU_LEFT || $position == MENU_RIGHT ? $frame_menu_width ? $frame_menu_width : 190 : $menu->getHeight(), "menu", "menu.php", $scrolling);
示例13: smarty_function_atkthemeimg
/**
* Implements the {atkthemeimg} plugin for use in templates.
*
* The atkthemeimg plugin retrieves an image path from the theme, while
* respecting inheritance within the theme. In other words, if
* a theme derives from the default theme, but does not define a
* new version of 'someimg.jpg', then {atkthemeimg someimg.jpg} will
* display the path to the default theme version of the same.
*
* Params: The name of the image to retrieve
*
* Example:
* <img src="{atkthemeimg test.gif}">
*
* @author Ivo Jansch <ivo@achievo.org>
*
*/
function smarty_function_atkthemeimg($params, &$smarty)
{
$theme =& atkinstance("atk.ui.atktheme");
return $theme->imgPath($params['id']);
}
示例14: smarty_function_atkscript
/**
* Implements the {atkscript} plugin for use in templates.
*
* The atkscript plugin registers a javascript file in the current page.
* Useful for templates that have an associated javascript that should
* be loaded each time the template is included.
*
* Params:
* file The path of the javascript, relative to the running scripts
* directory.
* prefix The prefix for the path of the javascript file,
* for example $atkroot
*
* Example:
* {atkscript file="javascript/default.js"}
*
* @author Peter C. Verhage <peter@achievo.org>
*/
function smarty_function_atkscript($params, &$smarty)
{
$page =& atkinstance('atk.ui.atkpage');
$page->register_script($params["prefix"] . $params["file"]);
return "";
}
示例15: atkinstance
<?php
$config_atkroot = "./";
include_once "atk.inc";
$atkserver = atkinstance("atk.interface.atkserver");
$atkserver->run();