*** empty log message ***
This commit is contained in:
parent
2cb50db5e7
commit
720cb18b4c
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
Author : $Author: sebastian $
|
||||
Version : $Revision: 1.10 $
|
||||
Version : $Revision: 1.11 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/htmlUI/var/Attic/conf.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -126,6 +126,9 @@ define('UI_REGEX_URL', '/^(ht|f)tps?:\/\/[^ ]+$/');
|
|||
define('UI_SCRATCHPAD_KEY', 'djBagContents');
|
||||
define('UI_SCRATCHPAD_MAXLENGTH_KEY', 'djBagMaxlength');
|
||||
#define('UI_SCRATCHPAD_REGEX', '/^[0-9a-f]{16}:[0-9]{4}-[0-9]{2}-[0-9]{2}$/');
|
||||
define('UI_SCRATCHPAD_SESSNAME', 'SP');
|
||||
define('UI_STATIONINFO_SESSNAME', 'SInfo');
|
||||
|
||||
## session keys
|
||||
define('UI_SCRATCHPAD_SESSNAME', 'SCRATCHPAD');
|
||||
define('UI_STATIONINFO_SESSNAME', 'STATIONINFO');
|
||||
define('UI_SEARCH_SESSNAME', 'SEARCH');
|
||||
?>
|
|
@ -21,7 +21,7 @@
|
|||
<td>{$i.title}</td>
|
||||
<td>{$i.duration}</td>
|
||||
<td>{$i.type} </td>
|
||||
<th><a href="#" onclick="hpopup('{$UI_HANDLER}?act=SP.removeItem&SPid={$i.id}', 'SP')">X</th>
|
||||
<th><a href="#" onclick="hpopup('{$UI_HANDLER}?act=SP.removeItem&id={$i.id}', 'SP')">X</th>
|
||||
</tr>
|
||||
{/foreach}
|
||||
<tr>
|
||||
|
@ -43,7 +43,7 @@ function SP_submit()
|
|||
|
||||
for (n=0; n < (document.forms['SP'].elements.length-1); n++) {
|
||||
if (document.forms['SP'].elements[n].checked) {
|
||||
href = href + '&SPid[]=' + document.forms['SP'].elements[n].name;
|
||||
href = href + '&id[]=' + document.forms['SP'].elements[n].name;
|
||||
}
|
||||
}
|
||||
hpopup(href, 'SP');
|
||||
|
|
|
@ -31,12 +31,12 @@ function switchMDataLang()
|
|||
}
|
||||
|
||||
function spread(element, name)
|
||||
{
|
||||
if (document.forms['editMetaData'].elements['Main__' + name]) document.forms['editMetaData'].elements['Main__' + name].value = element.value;
|
||||
if (document.forms['editMetaData'].elements['Music_Basic__' + name]) document.forms['editMetaData'].elements['Music_Basic__' + name].value = element.value;
|
||||
if (document.forms['editMetaData'].elements['Music_Advanced__' + name]) document.forms['editMetaData'].elements['Music_Advanced__' + name].value = element.value;
|
||||
if (document.forms['editMetaData'].elements['Talk_Basic__' + name]) document.forms['editMetaData'].elements['Talk_Basic__' + name].value = element.value;
|
||||
if (document.forms['editMetaData'].elements['Talk_Advanced__' + name]) document.forms['editMetaData'].elements['Talk_Advanced__' + name].value = element.value;
|
||||
{
|
||||
if (document.forms['editMetaData'].elements['Main___' + name]) document.forms['editMetaData'].elements['Main___' + name].value = element.value;
|
||||
if (document.forms['editMetaData'].elements['Music_Basic___' + name]) document.forms['editMetaData'].elements['Music_Basic___' + name].value = element.value;
|
||||
if (document.forms['editMetaData'].elements['Music_Advanced___' + name]) document.forms['editMetaData'].elements['Music_Advanced___' + name].value = element.value;
|
||||
if (document.forms['editMetaData'].elements['Talk_Basic___' + name]) document.forms['editMetaData'].elements['Talk_Basic___' + name].value = element.value;
|
||||
if (document.forms['editMetaData'].elements['Talk_Advanced___' + name]) document.forms['editMetaData'].elements['Talk_Advanced___' + name].value = element.value;
|
||||
}
|
||||
|
||||
function showMain()
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
{include file="editMetaData.tpl"}
|
||||
{/if}
|
||||
|
||||
{if $systemPrefs}
|
||||
{if $editSystemPrefs}
|
||||
{include file="systemPrefs.tpl"}
|
||||
{/if}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<a href="{$UI_BROWSER}?act=_analyzeFile&id={$o.id}">[Analyze]</a>
|
||||
<a href="{$UI_BROWSER}?act=editFile&id={$o.id}">[Edit]</a>
|
||||
<a href="{$UI_BROWSER}?act=editMetaData&id={$o.id}">[eMData]</a>
|
||||
<a href="#" onclick="hpopup('{$UI_HANDLER}?act=SP.addItem&SPid={$o.id}', '2SP')">[SP]</a>
|
||||
<a href="#" onclick="hpopup('{$UI_HANDLER}?act=SP.addItem&id={$o.id}', '2SP')">[SP]</a>
|
||||
{/if}
|
||||
|
||||
</td>
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<script type='text/javascript'>
|
||||
{literal}
|
||||
|
||||
function displayRow(row)
|
||||
function SearchForm_displayRow(row)
|
||||
{
|
||||
document.getElementById('searchRow_' + row).style.visibility = 'visible';
|
||||
document.getElementById('searchRow_' + row).style.height = '30px';
|
||||
}
|
||||
|
||||
function addRow()
|
||||
function SearchForm_addRow()
|
||||
{
|
||||
if (document.forms['search'].elements['counter'].value < document.forms['search'].elements['max_rows'].value) {
|
||||
document.forms['search'].elements['counter'].value++;
|
||||
displayRow(document.forms['search'].elements['counter'].value);
|
||||
SearchForm_displayRow(document.forms['search'].elements['counter'].value);
|
||||
return true;
|
||||
} else {
|
||||
alert('Maximum reached');
|
||||
|
@ -20,7 +20,7 @@ function addRow()
|
|||
}
|
||||
|
||||
|
||||
function hideRow(row)
|
||||
function SearchForm_hideRow(row)
|
||||
{
|
||||
document.getElementById('searchRow_' + row).style.visibility = 'hidden';
|
||||
document.getElementById('searchRow_' + row).style.height = '0px';
|
||||
|
@ -29,7 +29,7 @@ function hideRow(row)
|
|||
document.forms['search'].elements['row_' + Number(row) + '[2]'].value = '';
|
||||
}
|
||||
|
||||
function dropRow(row)
|
||||
function SearchForm_dropRow(row)
|
||||
{
|
||||
var n;
|
||||
for (n=row; n<document.forms['search'].elements['counter'].value; n++) {
|
||||
|
@ -38,10 +38,9 @@ function dropRow(row)
|
|||
document.forms['search'].elements['row_' + Number(n) + '[2]'].value = document.forms['search'].elements['row_' + (Number(n)+1) + '[2]'].value;
|
||||
}
|
||||
document.forms['search'].elements['counter'].value--;
|
||||
hideRow(Number(n));
|
||||
SearchForm_hideRow(Number(n));
|
||||
|
||||
}
|
||||
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -22,16 +22,16 @@
|
|||
{if $showSearchRes}
|
||||
<div id="searchres">
|
||||
<center>
|
||||
{if ( is_array($searchres.search))}
|
||||
{if is_array($searchres)}
|
||||
<table>
|
||||
<tr><th>{tra 0=Title}</th><th>{tra 0=Duration}</th><th></th></tr>
|
||||
{foreach from=$searchres.search item=s}
|
||||
{foreach from=$searchres item=s}
|
||||
<tr style="background-color: {cycle values='#eeeeee, #dadada'}">
|
||||
<td>{$s.title}</td>
|
||||
<td>{$s.duration}</td>
|
||||
<td><a href="{$UI_BROWSER}?act=getMdata&id={$s.id}">[XML]</a>
|
||||
<a href="{$UI_BROWSER}?act=editMetaDataValues&id={$s.id}">[Form]</a>
|
||||
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=add2SP&id={$s.id}', '2SP')">[SP]</a>
|
||||
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SP.addItem&id={$s.id}', '2SP')">[SP]</a>
|
||||
</td>
|
||||
</tr>
|
||||
</div>
|
||||
|
|
|
@ -99,13 +99,12 @@ if ($uiBrowser->userid) {
|
|||
|
||||
|
||||
case "search":
|
||||
if($_REQUEST['doSearch']) {
|
||||
$Smarty->assign('searchres', $uiBrowser->getSearchRes($uiBrwoser->id, $_REQUEST));
|
||||
if (is_array($uiBrowser->search['result']) ){
|
||||
$Smarty->assign('searchres', $uiBrowser->search['result']);
|
||||
$Smarty->assign('showSearchRes', TRUE);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$Smarty->assign('searchform', $uiBrowser->getSearchForm($uiBrowser->id, $_REQUEST, $ui_fmask));
|
||||
$Smarty->assign('searchform', $uiBrowser->getSearchForm($_REQUEST['id'], $ui_fmask));
|
||||
$Smarty->assign('showSearchForm', TRUE);
|
||||
|
||||
break;
|
||||
|
@ -143,7 +142,7 @@ if ($uiBrowser->userid) {
|
|||
break;
|
||||
|
||||
case "editMetaData":
|
||||
$Smarty->assign('editMetaData', $uiBrowser->editMetaData($uiBrowser->id, $ui_fmask['editMetaData'], TRUE));
|
||||
$Smarty->assign('editMetaData', $uiBrowser->editMetaData($uiBrowser->id, $ui_fmask['metaData'], TRUE));
|
||||
break;
|
||||
|
||||
case "_analyzeFile":
|
||||
|
|
|
@ -89,16 +89,16 @@ switch($_REQUEST['act']){
|
|||
break;
|
||||
|
||||
case "editMetaData":
|
||||
$uiHandler->editMetaData($uiHandler->id, $_REQUEST, $ui_fmask["editMetaData"]);
|
||||
$uiHandler->editMetaData($uiHandler->id, $_REQUEST, $ui_fmask["metaData"]);
|
||||
break;
|
||||
|
||||
case "SP.addItem":
|
||||
$uiHandler->SP->addItem($_REQUEST['SPid']);
|
||||
$uiHandler->SP->addItem($_REQUEST['id']);
|
||||
$uiHandler->SP->setReload();
|
||||
break;
|
||||
|
||||
case "SP.removeItem":
|
||||
$uiHandler->SP->removeItems($_REQUEST['SPid']);
|
||||
$uiHandler->SP->removeItems($_REQUEST['id']);
|
||||
$uiHandler->SP->setReload();
|
||||
break;
|
||||
|
||||
|
@ -107,6 +107,10 @@ switch($_REQUEST['act']){
|
|||
$uiHandler->SP->setReload();
|
||||
break;
|
||||
|
||||
case "search":
|
||||
$uiHandler->search($_REQUEST);
|
||||
break;
|
||||
|
||||
default:
|
||||
$_SESSION["alertMsg"] = tra("Unknown method: $1", $_REQUEST["act"]);
|
||||
header("Location: ".UI_BROWSER);
|
||||
|
|
|
@ -31,6 +31,28 @@ function tra($input)
|
|||
}
|
||||
|
||||
|
||||
function _getDArr($format)
|
||||
{
|
||||
#$arr[''] = '00';
|
||||
switch($format) {
|
||||
case 'h':
|
||||
for($n=0; $n<=23; $n++) {
|
||||
$arr[$this->_twoDigits($n)] = $this->_twoDigits($n);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
case 's':
|
||||
for($n=0; $n<=59; $n++) {
|
||||
$arr[$this->_twoDigits($n)] = $this->_twoDigits($n);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return $arr;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* uiBase class
|
||||
*
|
||||
|
@ -68,8 +90,9 @@ class uiBase
|
|||
$this->InputTextStandardAttrib = array('size' =>UI_INPUT_STANDARD_SIZE,
|
||||
'maxlength'=>UI_INPUT_STANDARD_MAXLENGTH);
|
||||
|
||||
$this->SP =& new uiScratchPad(&$this);
|
||||
$this->systemPrefs =& $_SESSION[UI_STATIONINFO_SESSNAME]; ;
|
||||
$this->SP =& new uiScratchPad(&$this);
|
||||
$this->systemPrefs =& $_SESSION[UI_STATIONINFO_SESSNAME];
|
||||
$this->search =& $_SESSION[UI_SEARCH_SESSNAME];
|
||||
}
|
||||
|
||||
|
||||
|
@ -250,28 +273,6 @@ class uiBase
|
|||
}
|
||||
|
||||
|
||||
function _getDArr($format)
|
||||
{
|
||||
#$arr[''] = '00';
|
||||
switch($format) {
|
||||
case 'h':
|
||||
for($n=0; $n<=23; $n++) {
|
||||
$arr[$this->_twoDigits($n)] = $this->_twoDigits($n);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
case 's':
|
||||
for($n=0; $n<=59; $n++) {
|
||||
$arr[$this->_twoDigits($n)] = $this->_twoDigits($n);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return $arr;
|
||||
}
|
||||
|
||||
|
||||
function _toHex($gunid)
|
||||
{
|
||||
$res = $this->dbc->query("SELECT to_hex($gunid)");
|
||||
|
@ -354,5 +355,21 @@ class uiBase
|
|||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
function _formElementEncode($str)
|
||||
{
|
||||
$str = str_replace(':', '__', $str);
|
||||
$str = str_replace('.', '_', $str);
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
function _formElementDecode($str)
|
||||
{
|
||||
$str = str_replace('__', ':', $str);
|
||||
$str = str_replace('_', '.', $str);
|
||||
return $str;
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -337,18 +337,18 @@ class uiBrowser extends uiBase {
|
|||
*
|
||||
* @return string (html)
|
||||
*/
|
||||
function getSearchForm($id, &$formdata, &$mask)
|
||||
function getSearchForm($id, &$mask)
|
||||
{
|
||||
$form = new HTML_QuickForm('search', 'get', UI_BROWSER);
|
||||
$form->setConstants(array('id'=>$id, 'counter'=>($formdata['counter'] ? $formdata['counter'] : UI_SEARCH_MIN_ROWS)));
|
||||
$form = new HTML_QuickForm('search', UI_STANDARD_FORM_METHOD, UI_HANDLER);
|
||||
$form->setConstants(array('id'=>$id, 'counter'=>UI_SEARCH_MIN_ROWS));
|
||||
|
||||
foreach ($mask['mData']['tabs']['group']['group'] as $k=>$v) {
|
||||
foreach ($mask['mData']['pages'][$v] as $val){
|
||||
$col1[$val['element']] = $val['element'];
|
||||
foreach ($mask['metaData']['tabs']['group']['group'] as $k=>$v) {
|
||||
foreach ($mask['metaData']['pages'][$v] as $val){
|
||||
$col1[$this->_formElementEncode($val['element'])] = $val['label'];
|
||||
if (isset($val['relation']))
|
||||
$col2[$val['element']] = $mask['relations'][$val['relation']];
|
||||
$col2[$this->_formElementEncode($val['element'])] = $mask['relations'][$val['relation']];
|
||||
else
|
||||
$col2[$val['element']] = $mask['relations']['standard'];
|
||||
$col2[$this->_formElementEncode($val['element'])] = $mask['relations']['standard'];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -357,20 +357,18 @@ class uiBrowser extends uiBase {
|
|||
|
||||
$form->addElement('static', 's1', NULL, "<div id='searchRow_$n'>");
|
||||
|
||||
if ($n>($formdata['counter'] ? $formdata['counter'] : UI_SEARCH_MIN_ROWS)) $form->addElement('static', 's1_style', NULL, "<style type='text/css'>#searchRow_$n {visibility : hidden; height : 0px;}</style>");
|
||||
if ($n > UI_SEARCH_MIN_ROWS) $form->addElement('static', 's1_style', NULL, "<style type='text/css'>#searchRow_$n {visibility : hidden; height : 0px;}</style>");
|
||||
$sel = &$form->createElement('hierselect', "row_$n", NULL);
|
||||
$sel->setOptions(array($col1, $col2));
|
||||
$group[] = &$sel;
|
||||
$group[] = &$form->createElement('text', 'row_'.$n.'[2]', NULL);
|
||||
$group[] = &$form->createElement('button', "dropRow_$n", 'Drop', array('onClick' => "dropRow('$n')"));
|
||||
$group[] = &$form->createElement('text', "row_$n".'[2]', NULL);
|
||||
$group[] = &$form->createElement('button', "dropRow_$n", 'Drop', array('onClick' => "SearchForm_dropRow('$n')"));
|
||||
$form->addGroup($group);
|
||||
|
||||
$form->addElement('static', 's2', NULL, "</div id='searchRow_$n'>");
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->_parseArr2Form($form, $mask['searchform']);
|
||||
$form->setConstants($this->search['criteria']);
|
||||
$form->validate();
|
||||
|
||||
$renderer =& new HTML_QuickForm_Renderer_Array(true, true);
|
||||
|
@ -381,41 +379,6 @@ class uiBrowser extends uiBase {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* getSearchRes
|
||||
*
|
||||
* get Search Result
|
||||
*
|
||||
* @param $id int local ID (file/folder) to search in
|
||||
* @param $serach string
|
||||
* @return array
|
||||
*/
|
||||
function getSearchRes($id, &$formdata)
|
||||
{
|
||||
foreach ($formdata as $key=>$val) {
|
||||
if (is_array($val) && strlen($val[2])) {
|
||||
$critArr[] = array('cat' => $val[0],
|
||||
'op' => $val[1],
|
||||
'val' => $val[2]
|
||||
);
|
||||
}
|
||||
}
|
||||
$searchCriteria = array('filetype' => $formdata['filetype'],
|
||||
'operator' => $formdata['operator'],
|
||||
'conditions'=> $critArr
|
||||
);
|
||||
|
||||
$results = $this->gb->localSearch($searchCriteria, $this->sessid);
|
||||
foreach ($results['results'] as $rec) {
|
||||
$res[] = $this->_getMetaInfo($this->gb->_idFromGunid($rec));
|
||||
}
|
||||
|
||||
return array('search' => $res,
|
||||
'id' => $id
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* getFile
|
||||
*
|
||||
|
@ -474,12 +437,12 @@ class uiBrowser extends uiBase {
|
|||
## convert element names to be unique over different forms-parts, add javascript to spread values over parts, add existing values from database
|
||||
foreach ($mask['tabs']['group']['group'] as $key) {
|
||||
foreach ($mask['pages'][$key] as $k=>$v) {
|
||||
$mask['pages'][$key][$k]['element'] = $key.'__'.$v['element'];
|
||||
$mask['pages'][$key][$k]['attributes'] = array_merge($mask['pages'][$key][$k]['attributes'], array('onChange' => "spread(this, '".$v['element']."')"));
|
||||
$mask['pages'][$key][$k]['element'] = $key.'___'.$this->_formElementEncode($v['element']);
|
||||
$mask['pages'][$key][$k]['attributes'] = array_merge($mask['pages'][$key][$k]['attributes'], array('onChange' => "spread(this, '".$this->_formElementEncode($v['element'])."')"));
|
||||
|
||||
## recive data from GreenBox
|
||||
if ($get) {
|
||||
$mask['pages'][$key][$k]['default'] = $this->_getMDataValue($id, strtr($v['element'], '_', '.'));
|
||||
$mask['pages'][$key][$k]['default'] = $this->_getMDataValue($id, $v['element']);
|
||||
}
|
||||
|
||||
## get data from parameter
|
||||
|
|
|
@ -91,7 +91,7 @@ $ui_fmask = array(
|
|||
),
|
||||
|
||||
/* =========================================================== Matadata-Mask */
|
||||
'editMetaData' => array(
|
||||
'metaData' => array(
|
||||
'basics' => array(
|
||||
array(
|
||||
'element' => 'act',
|
||||
|
@ -225,19 +225,19 @@ $ui_fmask = array(
|
|||
array(
|
||||
'element' => 'Format_Extent_h',
|
||||
'type' => 'select',
|
||||
'options' => $uiBase->_getDArr('h'),
|
||||
'options' => getDArr('h'),
|
||||
'groupit' => TRUE
|
||||
),
|
||||
array(
|
||||
'element' => 'Format_Extent_m',
|
||||
'type' => 'select',
|
||||
'options' => $uiBase->_getDArr('m'),
|
||||
'options' => getDArr('m'),
|
||||
'groupit' => TRUE
|
||||
),
|
||||
array(
|
||||
'element' => 'Format_Extent_s',
|
||||
'type' => 'select',
|
||||
'options' => $uiBase->_getDArr('h'),
|
||||
'options' => getDArr('h'),
|
||||
'groupit' => TRUE
|
||||
),
|
||||
array(
|
||||
|
@ -471,7 +471,6 @@ $ui_fmask = array(
|
|||
'element' => 'dc:title',
|
||||
'type' => 'text',
|
||||
'label' => 'Title',
|
||||
'relation' => 1
|
||||
),
|
||||
array(
|
||||
'element' => 'Coverage',
|
||||
|
@ -792,23 +791,31 @@ $ui_fmask = array(
|
|||
'options' => array(
|
||||
'File' => '*',
|
||||
'audioclip' => 'Audioclip',
|
||||
'webstream' => 'Webstream',
|
||||
'playlist' => 'Playlist'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'element' => 'clear',
|
||||
'type' => 'button',
|
||||
'label' => 'Clear',
|
||||
'attributes' => array('onClick' => "hpopup('".UI_HANDLER."?act=search', 'SF')"),
|
||||
'groupit' => TRUE,
|
||||
),
|
||||
array(
|
||||
'element' => 'addrow',
|
||||
'type' => 'button',
|
||||
'label' => 'One more Row',
|
||||
'attributes' => array('onClick' => 'addRow()'),
|
||||
'attributes' => array('onClick' => 'SearchForm_addRow()'),
|
||||
'groupit' => TRUE,
|
||||
),
|
||||
array(
|
||||
'element' => 'doSearch',
|
||||
'element' => 'submit',
|
||||
'type' => 'submit',
|
||||
'label' => 'Submit',
|
||||
'groupit' => TRUE,
|
||||
),
|
||||
array('group' => array('addrow', 'doSearch')
|
||||
array('group' => array('clear', 'addrow', 'submit')
|
||||
),
|
||||
),
|
||||
'relations' => array(
|
||||
|
|
|
@ -512,7 +512,7 @@ class uiHandler extends uiBase {
|
|||
|
||||
foreach ($mask['tabs']['group']['group'] as $key) {
|
||||
foreach ($mask['pages'][$key] as $k=>$v) {
|
||||
$formdata[$key.'__'.$v['element']] ? $mData[strtr($v['element'], '_', '.')] = $formdata[$key.'__'.$v['element']] : NULL;
|
||||
$formdata[$key.'___'.$this->_formElementEncode($v['element'])] ? $mData[$this->_formElementDecode($v['element'])] = $formdata[$key.'___'.$this->_formElementEncode($v['element'])] : NULL;
|
||||
}
|
||||
}
|
||||
$data = $this->_dateArr2Str($mData);
|
||||
|
@ -590,16 +590,42 @@ class uiHandler extends uiBase {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
function _isTextInput($input)
|
||||
{
|
||||
$test = array('text' =>0, 'textarea' =>0, 'select'=>0, 'radio'=>0, 'checkbox'=>0);
|
||||
if (array_key_exists($input, $test))
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
/**
|
||||
* search
|
||||
*
|
||||
* get Search Result and tore them in session
|
||||
*
|
||||
* @param $id int local ID (file/folder) to search in
|
||||
* @param $serach string
|
||||
*/
|
||||
function search(&$formdata)
|
||||
{
|
||||
$this->search = FALSE;;
|
||||
$this->search['criteria']['operator'] = $formdata['operator'];
|
||||
$this->search['criteria']['filetype'] = $formdata['filetype'];
|
||||
|
||||
foreach ($formdata as $key=>$val) {
|
||||
if (is_array($val) && strlen($val[2])) {
|
||||
$critArr[] = array('cat' => $this->_formElementDecode($val[0]),
|
||||
'op' => $val[1],
|
||||
'val' => $val[2]
|
||||
);
|
||||
$this->search['criteria'][$key] = $val;
|
||||
}
|
||||
}
|
||||
$searchCriteria = array('filetype' => $formdata['filetype'],
|
||||
'operator' => $formdata['operator'],
|
||||
'conditions'=> $critArr
|
||||
);
|
||||
|
||||
$results = $this->gb->localSearch($searchCriteria, $this->sessid);
|
||||
foreach ($results['results'] as $rec) {
|
||||
$this->search['result'][] = $this->_getMetaInfo($this->gb->_idFromGunid($rec));
|
||||
}
|
||||
|
||||
$this->redirUrl = UI_BROWSER.'?act=search&id='.$formdata['id'];
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue