*** empty log message ***
This commit is contained in:
parent
91c4f36d16
commit
a6852eb2b2
|
@ -1,7 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
## some constants ########################
|
$Smarty->register_object('uiBrowser', $uiBrowser);
|
||||||
$Smarty->assign('UI_BROWSER', UI_BROWSER);
|
|
||||||
$Smarty->assign('UI_HANDLER', UI_HANDLER);
|
$Smarty->register_function('str_repeat', 'S_str_repeat');
|
||||||
|
$Smarty->register_function('urlencode', 'S_urlencode');
|
||||||
|
$Smarty->register_function('htmlspecialchars', 'S_htmlspecialchars');
|
||||||
|
$Smarty->register_function('system', 'S_system');
|
||||||
|
$Smarty->register_function('tra', 'S_tra');
|
||||||
|
|
||||||
|
|
||||||
// --- Smarty Extensions ---
|
// --- Smarty Extensions ---
|
||||||
/**
|
/**
|
||||||
|
@ -19,7 +24,7 @@ function S_str_repeat($param)
|
||||||
return str_repeat($str, intval($count));
|
return str_repeat($str, intval($count));
|
||||||
|
|
||||||
}
|
}
|
||||||
$Smarty->register_function('str_repeat', 'S_str_repeat');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* urlencode
|
* urlencode
|
||||||
|
@ -34,7 +39,7 @@ function S_urlencode($param)
|
||||||
extract($param);
|
extract($param);
|
||||||
return urlencode($str);
|
return urlencode($str);
|
||||||
}
|
}
|
||||||
$Smarty->register_function('urlencode', 'S_urlencode');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* htmlspecialchars
|
* htmlspecialchars
|
||||||
|
@ -49,7 +54,7 @@ function S_htmlspecialchars($param)
|
||||||
extract($param);
|
extract($param);
|
||||||
return htmlspecialchars($str);
|
return htmlspecialchars($str);
|
||||||
}
|
}
|
||||||
$Smarty->register_function('htmlspecialchars', 'S_htmlspecialchars');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* system
|
* system
|
||||||
|
@ -63,7 +68,7 @@ function S_system($param)
|
||||||
extract($param);
|
extract($param);
|
||||||
eval($code);
|
eval($code);
|
||||||
}
|
}
|
||||||
$Smarty->register_function('system', 'S_system');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tra
|
* tra
|
||||||
|
@ -78,5 +83,4 @@ function S_tra($param)
|
||||||
|
|
||||||
echo $uiBrowser->tra($param[0], $param[1], $param[2], $param[3], $param[4], $param[5], $param[6], $param[7], $param[8], $param[9]);
|
echo $uiBrowser->tra($param[0], $param[1], $param[2], $param[3], $param[4], $param[5], $param[6], $param[7], $param[8], $param[9]);
|
||||||
}
|
}
|
||||||
$Smarty->register_function('tra', 'S_tra');
|
|
||||||
?>
|
?>
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: sebastian $
|
Author : $Author: sebastian $
|
||||||
Version : $Revision: 1.5 $
|
Version : $Revision: 1.6 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/htmlUI/var/Attic/conf.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/htmlUI/var/Attic/conf.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -2979,7 +2979,7 @@
|
||||||
|
|
||||||
* libs/Smarty.class.php
|
* libs/Smarty.class.php
|
||||||
libs/Smarty_Compiler.class.php:
|
libs/Smarty_Compiler.class.php:
|
||||||
added CVS $Id: ChangeLog,v 1.4 2005/02/09 16:50:18 sebastian Exp $
|
added CVS $Id: ChangeLog,v 1.5 2005/02/10 14:03:50 sebastian Exp $
|
||||||
|
|
||||||
2003-03-31 Messju Mohr <messju@lammfellpuschen.de>
|
2003-03-31 Messju Mohr <messju@lammfellpuschen.de>
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
* @package Smarty
|
* @package Smarty
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: Config_File.class.php,v 1.4 2005/02/09 16:50:18 sebastian Exp $ */
|
/* $Id: Config_File.class.php,v 1.5 2005/02/10 14:03:50 sebastian Exp $ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Config file reading class
|
* Config file reading class
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
* @version 2.6.6
|
* @version 2.6.6
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: Smarty.class.php,v 1.4 2005/02/09 16:50:18 sebastian Exp $ */
|
/* $Id: Smarty.class.php,v 1.5 2005/02/10 14:03:50 sebastian Exp $ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DIR_SEP isn't used anymore, but third party apps might
|
* DIR_SEP isn't used anymore, but third party apps might
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
* @package Smarty
|
* @package Smarty
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: Smarty_Compiler.class.php,v 1.4 2005/02/09 16:50:18 sebastian Exp $ */
|
/* $Id: Smarty_Compiler.class.php,v 1.5 2005/02/10 14:03:50 sebastian Exp $ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Template compiling class
|
* Template compiling class
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!-- $Id: smarty-dynamic-fancygroup.tpl,v 1.4 2005/02/09 16:50:18 sebastian Exp $ -->
|
<!-- $Id: smarty-dynamic-fancygroup.tpl,v 1.5 2005/02/10 14:03:50 sebastian Exp $ -->
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" align="right">
|
<td valign="top" align="right">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!-- $Id: smarty-dynamic-green.tpl,v 1.4 2005/02/09 16:50:18 sebastian Exp $ -->
|
<!-- $Id: smarty-dynamic-green.tpl,v 1.5 2005/02/10 14:03:50 sebastian Exp $ -->
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right" valign="top" class="green"><b>{$element.label}:</b></td>
|
<td align="right" valign="top" class="green"><b>{$element.label}:</b></td>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<!-- $Id: smarty-dynamic.tpl,v 1.4 2005/02/09 16:50:18 sebastian Exp $ -->
|
<!-- $Id: smarty-dynamic.tpl,v 1.5 2005/02/10 14:03:50 sebastian Exp $ -->
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Smarty template for Array renderer</title>
|
<title>Smarty template for Array renderer</title>
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
{include file="menu_top.tpl"}
|
{include file="menu_top.tpl"}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
{if $showSP}
|
||||||
|
{include file="scratchpad.tpl"}
|
||||||
|
{/if}
|
||||||
|
|
||||||
{if $showPath}
|
{if $showPath}
|
||||||
{include file="path.tpl"}
|
{include file="path.tpl"}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//opener.location.reload();
|
opener.location.reload();
|
||||||
opener.location.href="{$UI_BROWSER}";
|
//opener.location.href="{$UI_BROWSER}";
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
{*Smarty template*}
|
||||||
|
|
||||||
|
<div id="scratchpad">
|
||||||
|
<center><b>ScratchPad</b></center>
|
||||||
|
|
||||||
|
{if is_array($sp)}
|
||||||
|
<table>
|
||||||
|
<tr><th></th><th>{tra 0=Name}</th><th>{tra 0=Duration}</th><th>{tra 0=Type}</th></tr>
|
||||||
|
{foreach from=$sp item=i}
|
||||||
|
<tr>
|
||||||
|
<td><input type="checkbox" name="spid[{$row.id}]"></td>
|
||||||
|
<td>{$i.name}</td>
|
||||||
|
<td>{$i.duration}</td>
|
||||||
|
<td>{$i.type} </td>
|
||||||
|
</tr>
|
||||||
|
{/foreach}
|
||||||
|
</table>
|
||||||
|
{/if}
|
||||||
|
</div>
|
|
@ -43,7 +43,10 @@
|
||||||
}
|
}
|
||||||
{/literal}
|
{/literal}
|
||||||
|
|
||||||
|
{uiBrowser->alertMsg assign='alertMsg'}
|
||||||
{if $alertMsg}
|
{if $alertMsg}
|
||||||
alert('{$alertMsg}');
|
alert('{$alertMsg}');
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
<div style="background-color: {cycle values='#eeeeee, #dadada'}">{$s.gunid}
|
<div style="background-color: {cycle values='#eeeeee, #dadada'}">{$s.gunid}
|
||||||
<a href="{$UI_BROWSER}?act=getMdata&id={$s.par_id}">[XML]</a>
|
<a href="{$UI_BROWSER}?act=getMdata&id={$s.par_id}">[XML]</a>
|
||||||
<a href="{$UI_BROWSER}?act=editMetaDataValues&id={$s.par_id}">[Form]</a>
|
<a href="{$UI_BROWSER}?act=editMetaDataValues&id={$s.par_id}">[Form]</a>
|
||||||
|
<a href="#" onClick="popup('{$UI_HANDLER}?act=add2SP&id={$s.par_id}', '2SP', 1, 1)">[SP]</a>
|
||||||
</div>
|
</div>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
{else}
|
{else}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<!-- $Id: smarty-static.tpl,v 1.5 2005/02/09 16:50:18 sebastian Exp $ -->
|
<!-- $Id: smarty-static.tpl,v 1.6 2005/02/10 14:03:50 sebastian Exp $ -->
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Smarty template for ArraySmarty renderer: 2 column layout example</title>
|
<title>Smarty template for ArraySmarty renderer: 2 column layout example</title>
|
||||||
|
|
|
@ -49,6 +49,14 @@
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#scratchpad {
|
||||||
|
text-align: center;
|
||||||
|
width: 800px;
|
||||||
|
border-style : dotted;
|
||||||
|
padding : 5px;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
#path {
|
#path {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 800px;
|
width: 800px;
|
||||||
|
|
|
@ -31,7 +31,6 @@ if (is_array($_REQUEST['popup'])){
|
||||||
$Smarty->assign('loginform', $uiBrowser->loginform($Smarty, $ui_fmask));
|
$Smarty->assign('loginform', $uiBrowser->loginform($Smarty, $ui_fmask));
|
||||||
$Smarty->display('popup/login.tpl');
|
$Smarty->display('popup/login.tpl');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
die();
|
die();
|
||||||
|
@ -42,6 +41,9 @@ $Smarty->assign('statusbar', $uiBrowser->getStationInfo($ui_fmask['systemPrefs']
|
||||||
|
|
||||||
if ($uiBrowser->userid) {
|
if ($uiBrowser->userid) {
|
||||||
$Smarty->assign('showMenuTop', TRUE);
|
$Smarty->assign('showMenuTop', TRUE);
|
||||||
|
$Smarty->assign('sp', $uiBrowser->getSP());
|
||||||
|
$Smarty->assign('showSP', TRUE);
|
||||||
|
|
||||||
switch ($_REQUEST['act']){
|
switch ($_REQUEST['act']){
|
||||||
default:
|
default:
|
||||||
$Smarty->assign('structure', $uiBrowser->getStructure($uiBrowser->id));
|
$Smarty->assign('structure', $uiBrowser->getStructure($uiBrowser->id));
|
||||||
|
@ -150,6 +152,7 @@ if ($uiBrowser->userid) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#$Smarty->load_filter('output', 'trimwhitespace');
|
||||||
|
#$Smarty->register_outputfilter('smarty_outputfilter_trimwhitespace');
|
||||||
$Smarty->display('main.tpl');
|
$Smarty->display('main.tpl');
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -87,6 +87,10 @@ switch($_REQUEST['act']){
|
||||||
$uiHandler->storeMetaData($_REQUEST, $ui_fmask["mData"]);
|
$uiHandler->storeMetaData($_REQUEST, $ui_fmask["mData"]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "add2SP":
|
||||||
|
$uiHandler->add2SP($uiHandler->id);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$_SESSION["alertMsg"] = $uiHandler->tra("Unknown method: ").$_REQUEST["act"];
|
$_SESSION["alertMsg"] = $uiHandler->tra("Unknown method: ").$_REQUEST["act"];
|
||||||
header("Location: ".UI_BROWSER);
|
header("Location: ".UI_BROWSER);
|
||||||
|
|
|
@ -16,6 +16,35 @@ function errCallBack($err)
|
||||||
*/
|
*/
|
||||||
class uiBase
|
class uiBase
|
||||||
{
|
{
|
||||||
|
// --- class constructor ---
|
||||||
|
/**
|
||||||
|
* uiBase
|
||||||
|
*
|
||||||
|
* Initialize a new Basis Class including:
|
||||||
|
* - database initialation
|
||||||
|
* - GreenBox initialation
|
||||||
|
*
|
||||||
|
* @param $config array, configurartion data
|
||||||
|
*/
|
||||||
|
function uiBase(&$config)
|
||||||
|
{
|
||||||
|
$dbc = DB::connect($config['dsn'], TRUE);
|
||||||
|
if (DB::isError($dbc)) {
|
||||||
|
die($dbc->getMessage());
|
||||||
|
}
|
||||||
|
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||||
|
$this->gb =& new GreenBox(&$dbc, $config);
|
||||||
|
$this->sessid = $_REQUEST[$config['authCookieName']];
|
||||||
|
$this->userid = $this->gb->getSessUserId($this->sessid);
|
||||||
|
$this->login = $this->gb->getSessLogin($this->sessid);
|
||||||
|
$this->id = $_REQUEST['id'] ? $_REQUEST['id'] : $this->gb->getObjId($this->login, $this->gb->storId);
|
||||||
|
$this->InputTextStandardAttrib = array('size' =>UI_INPUT_STANDARD_SIZE,
|
||||||
|
'maxlength'=>UI_INPUT_STANDARD_MAXLENGTH);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// --- basic funtionality ---
|
// --- basic funtionality ---
|
||||||
/**
|
/**
|
||||||
* tra
|
* tra
|
||||||
|
@ -219,5 +248,81 @@ class uiBase
|
||||||
|
|
||||||
return $arr;
|
return $arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getSP()
|
||||||
|
{
|
||||||
|
$spData = $this->gb->loadPref($this->sessid, 'scratchPadContents');
|
||||||
|
if (!PEAR::isError($spData)) {
|
||||||
|
$arr = explode(' ', $spData);
|
||||||
|
foreach($arr as $val) {
|
||||||
|
$pieces = explode(':', $val);
|
||||||
|
$filedata = $this->getFileInfo($pieces[0]);
|
||||||
|
$res[] = array('id' => $pieces[0],
|
||||||
|
#'added' => $pieces[1],
|
||||||
|
'name' => $filedata['name'],
|
||||||
|
'duration' => $filedata['playtime_string']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ($res);
|
||||||
|
} else {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveSP($data)
|
||||||
|
{
|
||||||
|
foreach($data as $val) {
|
||||||
|
$str .= $val['id'].':'.$val['added'].' ';
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->gb->savePref($this->sessid, 'scratchPadContents', trim($str));
|
||||||
|
}
|
||||||
|
|
||||||
|
function add2SP($id)
|
||||||
|
{
|
||||||
|
if ($sp = $this->getSP()) {
|
||||||
|
foreach ($sp as $val) {
|
||||||
|
if ($val['id'] == $id) $exists = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$exists) {
|
||||||
|
$sp[] = array('id' => $id,
|
||||||
|
'added' => date('Y-m-d')
|
||||||
|
);
|
||||||
|
$this->saveSP($sp);
|
||||||
|
$this->_retmsg('Entry $1 added', $id);
|
||||||
|
} else {
|
||||||
|
$this->_retmsg('Entry $1 already exists', $id);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->redirUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
|
||||||
|
}
|
||||||
|
|
||||||
|
function _retmsg($msg, $p1=NULL, $p2=NULL, $p3=NULL, $p4=NULL, $p5=NULL, $p6=NULL, $p7=NULL, $p8=NULL, $p9=NULL)
|
||||||
|
{
|
||||||
|
$_SESSION['alertMsg'] = $this->tra($msg, $p1, $p2, $p3, $p4, $p5, $p6, $p7, $p8, $p9);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getFileName($id)
|
||||||
|
{
|
||||||
|
$file = array_pop($this->gb->getPath($id));
|
||||||
|
return $file['name'];
|
||||||
|
}
|
||||||
|
|
||||||
|
function getFileInfo($id)
|
||||||
|
{
|
||||||
|
$f = $this->gb->analyzeFile($id, $this->sessid);
|
||||||
|
return array(
|
||||||
|
'name' => $this->getFileName($id),
|
||||||
|
'type' => 0,
|
||||||
|
'filename' => $f['filename'],
|
||||||
|
'playtime_seconds' => $f['playtime_seconds'],
|
||||||
|
'playtime_string' => $f['playtime_string']
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -6,29 +6,14 @@ class uiBrowser extends uiBase {
|
||||||
/**
|
/**
|
||||||
* uiBrowser
|
* uiBrowser
|
||||||
*
|
*
|
||||||
* Initialize a new Browser Class including:
|
* Initialize a new Browser Class
|
||||||
* - database initialation
|
* Call uiBase constructor
|
||||||
* - GreenBox initialation
|
|
||||||
*
|
*
|
||||||
* @param $config array, configurartion data
|
* @param $config array, configurartion data
|
||||||
*/
|
*/
|
||||||
function uiBrowser($config)
|
function uiBrowser(&$config)
|
||||||
{
|
{
|
||||||
$dbc = DB::connect($config['dsn'], TRUE);
|
$this->uiBase($config);
|
||||||
if (DB::isError($dbc)) {
|
|
||||||
die($dbc->getMessage());
|
|
||||||
}
|
|
||||||
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
|
||||||
$this->gb =& new GreenBox(&$dbc, $config);
|
|
||||||
$this->sessid = $_REQUEST[$config['authCookieName']];
|
|
||||||
$this->userid = $this->gb->getSessUserId($this->sessid);
|
|
||||||
$this->login = $this->gb->getSessLogin($this->sessid);
|
|
||||||
$this->id = $_REQUEST['id'] ? $_REQUEST['id'] : $this->gb->getObjId($this->login, $this->gb->storId);
|
|
||||||
$this->InputTextStandardAttrib = array('size' =>UI_INPUT_STANDARD_SIZE,
|
|
||||||
'maxlength'=>UI_INPUT_STANDARD_MAXLENGTH);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- error handling ---
|
// --- error handling ---
|
||||||
|
@ -307,7 +292,7 @@ class uiBrowser extends uiBase {
|
||||||
*/
|
*/
|
||||||
function getSearchForm($id, &$formdata, &$mask)
|
function getSearchForm($id, &$formdata, &$mask)
|
||||||
{
|
{
|
||||||
$form = new HTML_QuickForm('search', UI_STANDARD_FORM_METHOD, UI_BROWSER);
|
$form = new HTML_QuickForm('search', 'get', UI_BROWSER);
|
||||||
$form->setConstants(array('id'=>$id, 'counter'=>($formdata['counter'] ? $formdata['counter'] : UI_SEARCH_MIN_ROWS)));
|
$form->setConstants(array('id'=>$id, 'counter'=>($formdata['counter'] ? $formdata['counter'] : UI_SEARCH_MIN_ROWS)));
|
||||||
|
|
||||||
foreach ($mask['mData']['tabs']['group']['group'] as $k=>$v) {
|
foreach ($mask['mData']['tabs']['group']['group'] as $k=>$v) {
|
||||||
|
|
|
@ -20,20 +20,22 @@ PEAR::setErrorHandling(PEAR_ERROR_RETURN);
|
||||||
#PEAR::setErrorHandling(PEAR_ERROR_PRINT);
|
#PEAR::setErrorHandling(PEAR_ERROR_PRINT);
|
||||||
|
|
||||||
// some global vars/objects
|
// some global vars/objects
|
||||||
$Smarty = new Smarty;
|
$Smarty = new Smarty;
|
||||||
require_once dirname(__FILE__).'/SmartyExtensions.inc.php';
|
|
||||||
$uiBrowser = new uiBrowser($config);
|
$uiBrowser = new uiBrowser($config);
|
||||||
$uiBase = new uiBase();
|
$uiBase = new uiBase($config);
|
||||||
|
|
||||||
## some basic things
|
require_once dirname(__FILE__).'/SmartyExtensions.inc.php';
|
||||||
$Smarty->assign('alertMsg', $uiBrowser->alertMsg());
|
|
||||||
|
## some basic things ################################################
|
||||||
|
$Smarty->assign('UI_BROWSER', UI_BROWSER);
|
||||||
|
$Smarty->assign('UI_HANDLER', UI_HANDLER);
|
||||||
$Smarty->assign('GLOBALS', array_merge($GLOBALS, array('id' => &$uiBrowser->id))); ## ??? really all GLOBALS ??? ##
|
$Smarty->assign('GLOBALS', array_merge($GLOBALS, array('id' => &$uiBrowser->id))); ## ??? really all GLOBALS ??? ##
|
||||||
$Smarty->assign('user', array('sessid' => &$uiBrowser->sessid,
|
$Smarty->assign('user', array('sessid' => &$uiBrowser->sessid,
|
||||||
'userid' => &$uiBrowser->userid,
|
'userid' => &$uiBrowser->userid,
|
||||||
'login' => &$uiBrowser->login
|
'login' => &$uiBrowser->login
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
## retransfer incomplete formdata from SESSION to POST-data
|
## retransfer incomplete formdata from SESSION to POST-data #########
|
||||||
if(is_array($_SESSION['retransferFormData'])){
|
if(is_array($_SESSION['retransferFormData'])){
|
||||||
foreach($_SESSION['retransferFormData'] as $k=>$v){
|
foreach($_SESSION['retransferFormData'] as $k=>$v){
|
||||||
$_POST[$k] = $v;
|
$_POST[$k] = $v;
|
||||||
|
|
|
@ -8,16 +8,18 @@ class uiHandler extends uiBase {
|
||||||
var $redirUrl;
|
var $redirUrl;
|
||||||
var $alertMsg;
|
var $alertMsg;
|
||||||
|
|
||||||
function uiHandler($config)
|
// --- class constructor ---
|
||||||
|
/**
|
||||||
|
* uiBrowser
|
||||||
|
*
|
||||||
|
* Initialize a new Browser Class
|
||||||
|
* Call uiBase constructor
|
||||||
|
*
|
||||||
|
* @param $config array, configurartion data
|
||||||
|
*/
|
||||||
|
function uiHandler(&$config)
|
||||||
{
|
{
|
||||||
$dbc = DB::connect($config['dsn'], TRUE);
|
$this->uiBase($config);
|
||||||
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
|
||||||
$this->gb =& new GreenBox(&$dbc, $config);
|
|
||||||
$this->id = (!$_REQUEST['id'] ? $this->gb->storId : $_REQUEST['id']);
|
|
||||||
$this->sessid = $_REQUEST[$config['authCookieName']];
|
|
||||||
$this->userid = $this->gb->getSessUserId($this->sessid);
|
|
||||||
$this->login = $this->gb->getSessLogin ($this->sessid);
|
|
||||||
$this->config = $config;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- authentication ---
|
// --- authentication ---
|
||||||
|
@ -517,7 +519,6 @@ class uiHandler extends uiBase {
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -17,7 +17,7 @@ PEAR::setErrorHandling(PEAR_ERROR_RETURN);
|
||||||
#PEAR::setErrorHandling(PEAR_ERROR_PRINT);
|
#PEAR::setErrorHandling(PEAR_ERROR_PRINT);
|
||||||
|
|
||||||
$uiHandler = new uiHandler($config);
|
$uiHandler = new uiHandler($config);
|
||||||
$uiBase = new uiBase();
|
$uiBase = new uiBase($config);
|
||||||
|
|
||||||
require_once dirname(__FILE__).'/ui_fmask.inc.php';
|
require_once dirname(__FILE__).'/ui_fmask.inc.php';
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue