本文整理汇总了PHP中atkconfig函数的典型用法代码示例。如果您正苦于以下问题:PHP atkconfig函数的具体用法?PHP atkconfig怎么用?PHP atkconfig使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了atkconfig函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: smarty_resource_theme_source
/**
* Smarty resource plug-in for fetching templates from the ATK theme.
*
* @author Peter C. Verhage <peter@ibuildings.nl>
*/
function smarty_resource_theme_source($tpl_name, &$tpl_source, &$smarty)
{
$theme =& atkTheme::getInstance();
$path = $theme->tplPath($tpl_name);
if (!empty($path)) {
$tpl_source = file_get_contents($path);
if (atkconfig('debug') >= 3) {
$tpl_source = "\n<!-- START [{$path}] -->\n" . $tpl_source . "\n<!-- END [{$path}] -->\n";
}
return true;
} else {
return false;
}
}
示例2: Image
{
var image = new Image();
image.onerror = atkLockUnlock;
image.src = '<?php
echo session_url('include.php?file=atk/lock/lock.php&type=image&stack=' . $stack);
?>
&id=' + atkLock.theIdentifier + '&sequence=' + atkLock.theSequence;
}
}
/**
* When the lock lease has expired we notify the user.
*/
function atkLockUnlock()
{
atkLock.isLocked = false;
if (typeof(document.images['_lock_']) != 'undefined')
document.images['_lock_'].src='<?php
echo atkconfig("atkroot");
?>
atk/images/lock_expired.gif';
alert('<?php
echo addslashes($message);
?>
');
}
atkLockInit('<?php
echo $id;
?>
');
示例3: header
* @access private
*
* @copyright (c)2000-2004 Ibuildings.nl BV
* @license http://www.achievo.org/atk/licensing ATK Open Source License
*
* @version $Revision: 1684 $
* $Id$
*/
/** @internal includes, defines etc. */
global $ATK_VARS;
$id = (int) $ATK_VARS["id"];
$type = $ATK_VARS["type"] == "xml" ? "xml" : "image";
$lock =& atkLock::getInstance();
/* extend lock lease */
if ($lock->extend($id)) {
// xml
if ($type == "xml") {
header("Content-type: text/xml");
echo "<response><success/></response>";
} else {
header("Content-type: image/gif");
readfile(atkconfig("atkroot") . 'atk/images/dummy.gif');
}
} else {
// xml
if ($type == "xml") {
echo "<response><failure/></response>";
} else {
header("HTTP/1.0 404 Not Found");
}
}
示例4: 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();"/>
示例5: atkFrame
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);
$noframes = '<p>Your browser doesnt support frames, but this is required to run ' . atktext('app_title') . "</p>\n";
$root =& new atkRootFrameset();
if (atkconfig("top_frame")) {
$outer =& new atkFrameSet("*", FRAMESET_VERTICAL, 0, $noframes);
$outer->addChild($topframe);
$root->addChild($outer);
} else {
$outer =& $root;
$outer->m_noframes = $noframes;
}
$orientation = $position == MENU_TOP || $position == MENU_BOTTOM ? FRAMESET_VERTICAL : FRAMESET_HORIZONTAL;
$wrapper =& new atkFrameSet("*", $orientation);
if ($position == MENU_TOP || $position == MENU_LEFT) {
$wrapper->addChild($menuframe);
$wrapper->addChild($mainframe);
} else {
$wrapper->addChild($mainframe);
$wrapper->addChild($menuframe);
示例6: time_format
function time_format($time, $displayzero = false)
{
useattrib("atkdurationattribute");
if ($time == 0 && !$displayzero) {
return " ";
}
if (atkconfig("durationformat", 0) == DURATIONFORMAT_DECIMAL) {
$decimalvalue = floor(abs($time) / 60) + abs($time) % 60 / 60;
$result = ($time < 0 ? "-" : "") . sprintf("%02.02f", $decimalvalue);
} elseif (atkconfig("durationformat", 0) == DURATIONFORMAT_TIME) {
$result = ($time < 0 ? "-" : "") . floor(abs($time) / 60) . ":" . sprintf("%02d", abs($time) % 60);
}
return $result;
}
示例7: atkconfig
<?php
/**
* Captcha wrapper for displaying a captcha image and storing the displayed code
* in the user session
*/
// captcha directory
$captchaDir = atkconfig("atkroot") . "atk/ext/captcha/";
// include captcha class
require $captchaDir . "php-captcha.inc.php";
//require("php-captcha.inc.php");
// define fonts
$aFonts = array($captchaDir . 'captcha_fonts/VeraBd.ttf', $captchaDir . 'captcha_fonts/VeraIt.ttf', $captchaDir . 'captcha_fonts/Vera.ttf');
// create new image
$oPhpCaptcha = new PhpCaptcha($aFonts, 200, 50);
$oPhpCaptcha->SetBackgroundImage($captchaDir . 'img/captcha.jpg');
$oPhpCaptcha->Create();
示例8: 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();
示例9: atkconfig
*/
// read data directly from database because session is cached
// secutity class.auth_db.inc->selectUser writes user info to db
$usertable = atkconfig("auth_usertable");
$userfield = atkconfig("auth_userfield");
$userid = $user['id'];
$query = "SELECT allowed_ip, is_suspended, last_seen_on, tbl_prefix FROM {$usertable} WHERE id ='{$userid}'";
$db =& atkGetDb(atkconfig("auth_database"));
$recs = $db->getrows($query);
$db_allowed_ip = $recs[0]['allowed_ip'];
$db_is_suspended = $recs[0]['is_suspended'];
$db_last_seen_on = $recs[0]['last_seen_on'];
$db_tbl_prefix = $recs[0]['tbl_prefix'];
$exp = explode(';', $db_last_seen_on);
$db_last_seen_ip = $exp[0];
$last_seen_on = $_SERVER[REMOTE_ADDR] . '; ' . atkconfig('identifier') . '=' . htmlspecialchars($_COOKIE[atkconfig('identifier')]);
// check if IP is allowed
if ($db_allowed_ip && $db_allowed_ip != '0' && $db_allowed_ip != ';') {
$pass_ip = false;
$exp = explode(';', $db_allowed_ip);
foreach ($exp as $ip) {
if (trim($ip) == $_SERVER[REMOTE_ADDR]) {
$pass_ip = true;
break;
}
}
if (!$pass_ip) {
$content = atktext('ip_not_allowed_ml');
$content .= '<br><br><center>IP: ' . $_SERVER[REMOTE_ADDR] . '</center>';
show_error_window($content, false);
die;
示例10: atksession
* subfolders. In advance to using this file, the config variables
* whithin this file must be adjusted.
*
* @package achievo
*
* @author guido <guido@ibuildings.nl>
*
* @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"));
示例11: atkpdf
<?php
//@set_time_limit(240);
/*******************************************************************************
* FPDF MOD 4 ATK *
* *
* Author: Alcal *
*******************************************************************************/
require 'tcpdf/config/lang/eng.php';
if (atkconfig('compress_pdf') == true) {
require 'tcpdf/tcpdf_compressed.php';
} else {
require 'tcpdf/tcpdf.php';
}
//define('FPDF_FONTPATH',$_SERVER['DOCUMENT_ROOT'].'/tokyo/moduli/pdf/fpdf/font/');
// dejavusans = utf8 **very slow!, helvetica = non-utf8 fast!
// TCPDF function _putresources() -> _putfonts() @8830 is slow for utf8
define('MAIN_ATK_FONT', 'dejavusans');
class atkpdf extends TCPDF
{
public function atkpdf()
{
//call original constructor
$this->__construct(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
}
function set_doc_properties($report_title, $orientation = 'P', $header = array(), $image = '', $imagewidth = 0)
{
//define ('DATE_FORMATTING', 'd/M/Y H:i');
define('DATE_FORMATTING', atktext('date_format_pdfreport'));
define('ATK_PDF_SETCREATOR', $header['CREATOR']);
define('ATK_PDF_SETAUTHOR', $header['AUTHOR']);
示例12: atkconfig
<?php
include_once atkconfig("atkroot") . "atk/ui/smarty/Smarty.class.php";
/**
* Project: Smarty: the PHP compiling template engine
* File: Smarty_Compiler.class.php
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @link http://smarty.php.net/
* @author Monte Ohrt <monte at ohrt dot com>
* @author Andrei Zmievski <andrei@php.net>
* @version 2.6.11
* @copyright 2001-2005 New Digital Group, Inc.
* @package Smarty
*/
/* $Id: Smarty_Compiler.class.php 6354 2009-04-15 02:41:21Z mvdam $ */
/**
* Template compiling class
示例13: smarty_function_atkconfig
/**
* Function for getting a configuration variable and set this in a variable in smarty.
*
* @author Lineke Kerckhoffs-Willems <lineke@ibuildings.nl>
*/
function smarty_function_atkconfig($params, &$smarty)
{
$smarty->assign($params["smartyvar"], atkconfig($params["var"]));
}
示例14: getFirmData
function getFirmData($id)
{
$sql = "SELECT * FROM ia32_config";
$conn = atkGetUser(atkconfig('auth_dbconfigfield'));
$db =& atkGetDb($conn);
$user_prefix = atkGetUser(atkconfig('auth_tblprefixfield'));
$sql = str_replace('ia32_', $user_prefix, $sql);
$ret = $db->getrows($sql);
return $ret[0];
}
示例15: array
// restore to the original,
// for node installations
// may be dependent on
// the value of this setting.
// for example, employee only
// adds a password field if
// authentication is 'db'.
if ($g_user["name"] != "administrator") {
$errors[] = "You can only run the install script using the 'administrator' account.";
}
// Now that we have included the configfile, we can validate the database setup.
// Note: we don't check the existance of the database or its tables yet, since
// the installer can install the database if needed. Here, we just check if PHP
// was compiled with the correct database support.
$dbs = array("mysqli" => "mysqli_connect", "oci8" => "OCILogon", "oci9" => "OCILogin", "pgsql" => "pg_connect");
$dbconfig = atkconfig("db");
if (!function_exists($dbs[$dbconfig["default"]["driver"]])) {
$errors[] = "Your PHP installation seems to be compiled without <b>" . $dbconfig["default"]["driver"] . "</b>\n database support.\n <br>Please recompile PHP with support for " . $dbconfig["default"]["driver"] . ", or, if you\n installed from rpm, install the php rpm for this database.\n <br>Alternatively, select a different database in the config.inc.php file (<b>\$config_database</b>).";
}
// If there are any errors when we reach this point, it's no use continuing because
// we don't have a correct database setup, so we can't continue setup.
if (count($errors) > 0) {
displayErrors($errors);
exit;
}
// Create node
$obj =& atkGetNode("setup.setup");
if ($ATK_VARS["atkaction"] == "") {
$ATK_VARS["atkaction"] = "intro";
}
if (is_object($obj)) {