*** empty log message ***
This commit is contained in:
parent
2d4e093c3b
commit
8397693da8
16 changed files with 75 additions and 75 deletions
|
@ -72,9 +72,10 @@ function S_htmlspecialchars($param)
|
||||||
*
|
*
|
||||||
* @param void array, array of strings to be outputted translated
|
* @param void array, array of strings to be outputted translated
|
||||||
*/
|
*/
|
||||||
function S_tra($param)
|
function S_tra($in)
|
||||||
{
|
{
|
||||||
global $uiBrowser;
|
global $uiBrowser;
|
||||||
|
foreach($in as $val) $param[] = $val;
|
||||||
|
|
||||||
echo tra($param[0], $param[1], $param[2], $param[3], $param[4], $param[5], $param[6], $param[7], $param[8], $param[9]);
|
echo tra($param[0], $param[1], $param[2], $param[3], $param[4], $param[5], $param[6], $param[7], $param[8], $param[9]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -419,11 +419,11 @@ $ui_fmask = array(
|
||||||
'groupit' => TRUE,
|
'groupit' => TRUE,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'element' => 'addrow',
|
'element' => 'spacer',
|
||||||
'type' => 'button',
|
'type' => 'static',
|
||||||
'label' => 'Add Criteria',
|
'text' => '
|
||||||
'attributes' => array('class' => 'button_wide', 'onClick' => 'SearchForm_addRow()'),
|
|
||||||
'groupit' => TRUE,
|
'
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'element' => 'submit',
|
'element' => 'submit',
|
||||||
|
@ -432,7 +432,7 @@ $ui_fmask = array(
|
||||||
'groupit' => TRUE,
|
'groupit' => TRUE,
|
||||||
'attributes' => array('class' => 'button_wide')
|
'attributes' => array('class' => 'button_wide')
|
||||||
),
|
),
|
||||||
array('group' => array('clear', 'addrow', 'submit')
|
array('group' => array('clear', 'spacer', 'submit')
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,11 @@ if (is_array($_REQUEST['popup'])){
|
||||||
$Smarty->display('popup/_redirector.tpl');
|
$Smarty->display('popup/_redirector.tpl');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "_2SCHEDULER":
|
||||||
|
$Smarty->assign('target', 'SCHEDULER');
|
||||||
|
$Smarty->display('popup/_redirector.tpl');
|
||||||
|
break;
|
||||||
|
|
||||||
case "login":
|
case "login":
|
||||||
$Smarty->assign('dynform', $uiBrowser->login($ui_fmask));
|
$Smarty->assign('dynform', $uiBrowser->login($ui_fmask));
|
||||||
$Smarty->display('popup/login.tpl');
|
$Smarty->display('popup/login.tpl');
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
{UIBROWSER->fileForm id=$editItem.id folderId=$editItem.folderId assign="dynform"}
|
{UIBROWSER->fileForm id=$editItem.id folderId=$editItem.folderId assign="dynform"}
|
||||||
{include file="sub/dynForm_plain.tpl}
|
{include file="sub/dynForm_plain.tpl}
|
||||||
{assign var="_uploadform" value=NULL}
|
{assign var="_uploadform" value=null}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{UIBROWSER->webstreamForm id=$editItem.id folderId=$editItem.folderId assign="dynform"}
|
{UIBROWSER->webstreamForm id=$editItem.id folderId=$editItem.folderId assign="dynform"}
|
||||||
{include file="sub/dynForm_plain.tpl}
|
{include file="sub/dynForm_plain.tpl}
|
||||||
{assign var="_uploadform" value=NULL}
|
{assign var="_uploadform" value=null}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
function SearchForm_displayRow(row)
|
function SearchForm_displayRow(row)
|
||||||
{
|
{
|
||||||
document.getElementById('searchRow_' + row).style.display = 'inline';
|
document.getElementById('searchRow_' + row).style.display = 'inline';
|
||||||
|
document.forms['search'].elements['row_' + Number(row) + '[active]'].value = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
function SearchForm_addRow()
|
function SearchForm_addRow()
|
||||||
|
@ -25,6 +26,7 @@ function SearchForm_hideRow(row)
|
||||||
document.forms['search'].elements['row_' + Number(row) + '[0]'].options[0].selected = true;
|
document.forms['search'].elements['row_' + Number(row) + '[0]'].options[0].selected = true;
|
||||||
document.forms['search'].elements['row_' + Number(row) + '[1]'].options[0].selected = true;
|
document.forms['search'].elements['row_' + Number(row) + '[1]'].options[0].selected = true;
|
||||||
document.forms['search'].elements['row_' + Number(row) + '[2]'].value = '';
|
document.forms['search'].elements['row_' + Number(row) + '[2]'].value = '';
|
||||||
|
document.forms['search'].elements['row_' + Number(row) + '[active]'].value = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
function SearchForm_dropRow(row)
|
function SearchForm_dropRow(row)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<ul id="nav">
|
<ul id="nav">
|
||||||
<li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=editFile">##Add Audio##</a>
|
<li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=editFile">##Add Audio##</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=editFile">##File##</a></li>
|
<li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=editFile" >##File##</a></li>
|
||||||
<li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=editWebstream">##Stream##</a></li>
|
<li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=editWebstream">##Stream##</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
@ -14,13 +14,20 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="{$UI_BROWSER}?id={$START.fid}&act=PL.simpleManagement">##Playlist Editor##</a></li>
|
<li><a href="{$UI_BROWSER}?id={$START.fid}&act=PL.simpleManagement">##Playlist Editor##</a></li>
|
||||||
<li><a href="{$UI_BROWSER}?act=SCHEDULER">##Scheduler##</a></li>
|
<li><a href="{$UI_BROWSER}?act=SCHEDULER">##Scheduler##</a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="javascript: hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=month'); location.href='{$UI_BROWSER}?act=SCHEDULER'">##Month##</a></li>
|
||||||
|
<li><a href="javascript: hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=week'); location.href='{$UI_BROWSER}?act=SCHEDULER'">##Week##</a></li>
|
||||||
|
<li><a href="javascript: hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day'); location.href='{$UI_BROWSER}?act=SCHEDULER'">##Day##</a></li>
|
||||||
|
<li><a href="javascript: hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day&today=1'); location.href='{$UI_BROWSER}?act=SCHEDULER'">##Today##</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
{if $SUBJECTS->Base->gb->checkPerm($SUBJECTS->Base->userid, 'subjects')}
|
{if $SUBJECTS->Base->gb->checkPerm($SUBJECTS->Base->userid, 'subjects')}
|
||||||
<li><a href="{$UI_BROWSER}?act=changeStationPrefs">##Station Settings##</a>
|
<li><a href="{$UI_BROWSER}?act=changeStationPrefs">##Station Settings##</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{$UI_BROWSER}?act=changeStationPrefs">##Station Settings##</a></li>
|
<li><a href="{$UI_BROWSER}?act=changeStationPrefs" >##Station Settings##</a></li>
|
||||||
<li><a href="{$UI_BROWSER}?act=SUBJECTS">##User/Groups##</a></li>
|
<li><a href="{$UI_BROWSER}?act=SUBJECTS" >##User/Groups##</a></li>
|
||||||
<li><a href="{$UI_BROWSER}?act=fileList&id={$START.fid}">##File List##</a></li>
|
<li><a href="{$UI_BROWSER}?act=fileList&id={$START.fid}">##File List##</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
<!-- start playlist editor -->
|
<!-- start playlist editor -->
|
||||||
<div class="container_elements" style="width: 607px;">
|
<div class="container_elements" style="width: 607px;">
|
||||||
|
|
||||||
<h1>##Playlist Editor##: <a href="{$UI_BROWSER}?act=PL.editMetaData" style="color: #666666">{$PL->title}</a></h1>
|
<div style="width: 574px;">
|
||||||
|
<div style="float: left;"><h1>##Playlist Editor## </h1></div>
|
||||||
|
<div style="float: right;"><h1><a href="{$UI_BROWSER}?act=PL.editMetaData" style="color: #666666">{$PL->title} {getHour time=$PL->duration}##h## {getMinute time=$PL->duration}##m## {getSecond time=$PL->duration}##s##</a></h1></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="head" style="width: 574px;">
|
<div class="head" style="width: 574px;">
|
||||||
<div class="left"> </div>
|
<div class="left"> </div>
|
||||||
<div class="right"> </div>
|
<div class="right"> </div>
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
<!-- start calendar tabs -->
|
<!-- start calendar tabs -->
|
||||||
<div id="tabnavsmall">
|
<div id="tabnavsmall">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day')">##Day##</a></li>
|
<li><a href="javascript: hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day')">##Day##</a></li>
|
||||||
<li><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=week')">##Week##</a></li>
|
<li><a href="javascript: hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=week')">##Week##</a></li>
|
||||||
<li><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=month')">##Month##</a></li>
|
<li><a href="javascript: hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=month')">##Month##</a></li>
|
||||||
<li><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day&today=1')">##Today##</a></li>
|
<li><a href="javascript: hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day&today=1')">##Today##</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- end calendar tabs -->
|
<!-- end calendar tabs -->
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
<div class="whatplaying">
|
<div class="whatplaying">
|
||||||
{if $_nowplaying}
|
{if $_nowplaying}
|
||||||
<div class="nowplaying">Now Playing: {$_nowplaying.title}</div>
|
<div class="nowplaying">Now Playing: {$_nowplaying.title}</div>
|
||||||
<div class="scala">
|
<div class="scala">
|
||||||
<div class="scala_in" style="width: {$_nowplaying.percentage}%;"> </div>
|
<div class="scala_in" style="width: {$_nowplaying.percentage}%;"> </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="time">
|
<div class="time">
|
||||||
|
@ -65,45 +65,5 @@
|
||||||
<!-- end header right -->
|
<!-- end header right -->
|
||||||
<!-- end header -->
|
<!-- end header -->
|
||||||
|
|
||||||
{assign var='_nowplaying' value=NULL}
|
{assign var='_nowplaying' value=null}
|
||||||
{assign var='_nextplaying' value=NULL}
|
{assign var='_nextplaying' value=null}
|
||||||
|
|
||||||
|
|
||||||
{*
|
|
||||||
<!-- old template -->
|
|
||||||
<div id="statusbar">
|
|
||||||
|
|
||||||
<div class="statusbaritem">
|
|
||||||
server time
|
|
||||||
<br>
|
|
||||||
<span id=servertime style="position:relative;"></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="statusbaritem">
|
|
||||||
local time
|
|
||||||
<br>
|
|
||||||
<span id=localtime style="position:relative;"></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="statusbaritem">
|
|
||||||
<img src="{$STATIONPREFS.stationLogoPath}" width="30" height="50">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="statusbaritem">
|
|
||||||
{$STATIONPREFS.stationName}
|
|
||||||
<br>
|
|
||||||
{$STATIONPREFS.frequency}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="statusbaritem">
|
|
||||||
{$SCHEDULER->getNowNextClip()}
|
|
||||||
<br>
|
|
||||||
{$STATIONPREFS.frequency}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="statusbaritem">
|
|
||||||
{include file="userinfo.tpl"}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
*}
|
|
||||||
|
|
|
@ -39,4 +39,4 @@ onClick="return contextmenu('{$i.id}'
|
||||||
{$moreContextAfter}
|
{$moreContextAfter}
|
||||||
)"
|
)"
|
||||||
|
|
||||||
{assign var="_PL_activeId" value=NULL}
|
{assign var="_PL_activeId" value=null}
|
||||||
|
|
|
@ -6,6 +6,7 @@ define('UI_ERROR', TRUE);
|
||||||
define('UI_DEFAULT_LANGID', 'en_GB');
|
define('UI_DEFAULT_LANGID', 'en_GB');
|
||||||
#define('UI_TIMEZONE', ' +100');
|
#define('UI_TIMEZONE', ' +100');
|
||||||
define('UI_TIMEZONEOFFSET', date('Z'));
|
define('UI_TIMEZONEOFFSET', date('Z'));
|
||||||
|
|
||||||
|
|
||||||
## Basic scripts
|
## Basic scripts
|
||||||
define('UI_HANDLER', 'ui_handler.php');
|
define('UI_HANDLER', 'ui_handler.php');
|
||||||
|
@ -70,6 +71,7 @@ define('UI_BROWSE_DEFAULT_LIMIT', 10);
|
||||||
|
|
||||||
## Scheduler / Calendar
|
## Scheduler / Calendar
|
||||||
define('UI_SCHEDULER_FIRSTWEEKDAY', 1);
|
define('UI_SCHEDULER_FIRSTWEEKDAY', 1);
|
||||||
|
define('UI_SCHEDULER_DEFAULT_VIEW', 'day');
|
||||||
define('UI_SCHEDULER_PAUSE_PL2PL', '5 seconds');
|
define('UI_SCHEDULER_PAUSE_PL2PL', '5 seconds');
|
||||||
|
|
||||||
## File types
|
## File types
|
||||||
|
|
|
@ -65,7 +65,7 @@ class uiHandler extends uiBase {
|
||||||
}
|
}
|
||||||
$this->sessid = $sessid;
|
$this->sessid = $sessid;
|
||||||
$this->langid = $formdata['langid'];
|
$this->langid = $formdata['langid'];
|
||||||
$this->redirUrl = UI_BROWSER.'?popup[]=_clear_parent&popup[]=_close';
|
$this->redirUrl = UI_BROWSER.'?popup[]=_2SCHEDULER&popup[]=_close';
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ class uiPlaylist
|
||||||
$this->Base =& $uiBase;
|
$this->Base =& $uiBase;
|
||||||
$this->activeId =& $_SESSION[UI_PLAYLIST_SESSNAME]['activeId'];
|
$this->activeId =& $_SESSION[UI_PLAYLIST_SESSNAME]['activeId'];
|
||||||
$this->title = $this->Base->_getMDataValue($this->activeId, UI_MDATA_KEY_TITLE);
|
$this->title = $this->Base->_getMDataValue($this->activeId, UI_MDATA_KEY_TITLE);
|
||||||
|
$this->duration = $this->Base->_getMDataValue($this->activeId, UI_MDATA_KEY_DURATION);
|
||||||
$this->token =& $_SESSION[UI_PLAYLIST_SESSNAME]['token'];
|
$this->token =& $_SESSION[UI_PLAYLIST_SESSNAME]['token'];
|
||||||
$this->reloadUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
|
$this->reloadUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
|
||||||
$this->redirectUrl = UI_BROWSER.'?popup[]=_2PL.simpleManagement&popup[]=_close';
|
$this->redirectUrl = UI_BROWSER.'?popup[]=_2PL.simpleManagement&popup[]=_close';
|
||||||
|
|
|
@ -9,7 +9,7 @@ class uiScheduler extends uiCalendar
|
||||||
$this->scheduleNext =& $_SESSION[UI_CALENDAR_SESSNAME]['scheduleNext'];
|
$this->scheduleNext =& $_SESSION[UI_CALENDAR_SESSNAME]['scheduleNext'];
|
||||||
|
|
||||||
if (!is_array($this->curr)) {
|
if (!is_array($this->curr)) {
|
||||||
$this->curr['view'] = 'month';
|
$this->curr['view'] = UI_SCHEDULER_DEFAULT_VIEW;
|
||||||
$this->curr['year'] = strftime("%Y");
|
$this->curr['year'] = strftime("%Y");
|
||||||
$this->curr['month'] = strftime("%m");
|
$this->curr['month'] = strftime("%m");
|
||||||
$this->curr['week'] = strftime("%V");
|
$this->curr['week'] = strftime("%V");
|
||||||
|
@ -103,7 +103,7 @@ class uiScheduler extends uiCalendar
|
||||||
|
|
||||||
## search for previous entry
|
## search for previous entry
|
||||||
if (count($week[$this->scheduleAt['day']]) >= 1) {
|
if (count($week[$this->scheduleAt['day']]) >= 1) {
|
||||||
foreach (array_reverse($week[$this->scheduleAt['day']]) as $entry) {
|
foreach (array_reverse($week[$this->scheduleAt['day']]) as $entry) {
|
||||||
if (strtotime($entry[0]['end']) <= strtotime($this->scheduleAt['hour'].':'.$this->scheduleAt['minute'].':'.$this->scheduleAt['second'])) {
|
if (strtotime($entry[0]['end']) <= strtotime($this->scheduleAt['hour'].':'.$this->scheduleAt['minute'].':'.$this->scheduleAt['second'])) {
|
||||||
$prev = TRUE;
|
$prev = TRUE;
|
||||||
list ($this->schedulePrev['hour'], $this->schedulePrev['minute'], $this->schedulePrev['second'])
|
list ($this->schedulePrev['hour'], $this->schedulePrev['minute'], $this->schedulePrev['second'])
|
||||||
|
@ -370,14 +370,15 @@ class uiScheduler extends uiCalendar
|
||||||
$datetime = strftime('%Y-%m-%dT%H:%M:%S');
|
$datetime = strftime('%Y-%m-%dT%H:%M:%S');
|
||||||
$xmldatetime = str_replace('-', '', $datetime);
|
$xmldatetime = str_replace('-', '', $datetime);
|
||||||
$pl = $this->displayScheduleMethod($xmldatetime, $xmldatetime);
|
$pl = $this->displayScheduleMethod($xmldatetime, $xmldatetime);
|
||||||
if(!is_array($pl) || !count($pl))
|
|
||||||
return FALSE;
|
if(!is_array($pl) || !count($pl)) return FALSE;
|
||||||
|
|
||||||
$pl = current($pl);
|
$pl = current($pl);
|
||||||
$offset = strftime('%H:%M:%S', $this->_strtotime($datetime) - $this->_datetime2timestamp($pl['start']) - UI_TIMEZONEOFFSET);
|
$offset = strftime('%H:%M:%S', time() - $this->_datetime2timestamp($pl['start']) - 3600); ## subtract 3600 sec. becausefor some reason strftime('%H:%M:%S', 0) is 01:00:00
|
||||||
$clip = $this->Base->gb->displayPlaylistClipAtOffset($this->Base->sessid, $pl['playlistId'], $offset, $distance);
|
$clip = $this->Base->gb->displayPlaylistClipAtOffset($this->Base->sessid, $pl['playlistId'], $offset, $distance);
|
||||||
if(!$clip['gunid'])
|
|
||||||
return FALSE;
|
if (!$clip['gunid']) return FALSE;
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'title' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($clip['gunid']), UI_MDATA_KEY_TITLE),
|
'title' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($clip['gunid']), UI_MDATA_KEY_TITLE),
|
||||||
'duration' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($clip['gunid']), UI_MDATA_KEY_DURATION),
|
'duration' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($clip['gunid']), UI_MDATA_KEY_DURATION),
|
||||||
|
|
|
@ -43,18 +43,33 @@ class uiSearch
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
for($n = 1; $n <= UI_SEARCH_MAX_ROWS; $n++) {
|
for($n = 1; $n <= UI_SEARCH_MAX_ROWS; $n++) {
|
||||||
unset ($group);
|
unset ($group);
|
||||||
|
|
||||||
|
if ($n > 1 && $n > $this->criteria['counter'])
|
||||||
|
$activerow = FALSE;
|
||||||
|
else $activerow = TRUE;
|
||||||
|
|
||||||
$form->addElement('static', 's1', NULL, "<div id='searchRow_$n'>");
|
$form->addElement('static', 's1', NULL, "<div id='searchRow_$n'>");
|
||||||
if ($n > 1 && $n > $this->criteria['counter']) $form->addElement('static', 's1_style', NULL, "<style type='text/css'>#searchRow_$n {display:none; height : 0px;}</style>");
|
|
||||||
|
if ($activerow===FALSE) $form->addElement('static', 's1_style', NULL, "<style type='text/css'>#searchRow_$n {display:none; height:0px}</style>");
|
||||||
|
|
||||||
$sel = &$form->createElement('hierselect', "row_$n", NULL);
|
$sel = &$form->createElement('hierselect', "row_$n", NULL);
|
||||||
$sel->setOptions(array($col1, $col2));
|
$sel->setOptions(array($col1, $col2));
|
||||||
$group[] = &$sel;
|
$group[] = &$sel;
|
||||||
$group[] = &$form->createElement('text', "row_$n".'[2]', NULL);
|
$group[] = &$form->createElement('text', "row_$n".'[2]', NULL);
|
||||||
$group[] = &$form->createElement('button', "dropRow_$n", 'Drop', array('onClick' => "SearchForm_dropRow('$n')", 'class' => UI_BUTTON_STYLE));
|
|
||||||
|
if ($activerow) $group[] = &$form->createElement('hidden', "row_$n".'[active]', TRUE);
|
||||||
|
else $group[] = &$form->createElement('hidden', "row_$n".'[active]', FALSE);
|
||||||
|
|
||||||
|
if ($n === 1) $group[] = &$form->createElement('button', "addRow", tra('+'), array('onClick' => "SearchForm_addRow('$n')", 'class' => UI_BUTTON_STYLE));
|
||||||
|
else $group[] = &$form->createElement('button', "dropRow_$n", tra('-'), array('onClick' => "SearchForm_dropRow('$n')", 'class' => UI_BUTTON_STYLE));
|
||||||
|
|
||||||
$form->addGroup($group);
|
$form->addGroup($group);
|
||||||
$form->addElement('static', 's2', NULL, "</div id='searchRow_$n'>");
|
$form->addElement('static', 's2', NULL, "</div id='searchRow_$n'>");
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->Base->_parseArr2Form($form, $mask2['search']);
|
$this->Base->_parseArr2Form($form, $mask2['search']);
|
||||||
$form->setConstants($this->criteria['form']);
|
$form->setConstants($this->criteria['form']);
|
||||||
$form->validate();
|
$form->validate();
|
||||||
|
@ -68,6 +83,8 @@ class uiSearch
|
||||||
|
|
||||||
function newSearch(&$formdata)
|
function newSearch(&$formdata)
|
||||||
{
|
{
|
||||||
|
#print_r($formdata);
|
||||||
|
|
||||||
$this->results = NULL;
|
$this->results = NULL;
|
||||||
$this->criteria['conditions'] = NULL;
|
$this->criteria['conditions'] = NULL;
|
||||||
$this->criteria['offset'] = NULL;
|
$this->criteria['offset'] = NULL;
|
||||||
|
@ -83,7 +100,7 @@ class uiSearch
|
||||||
$this->criteria['form']['limit'] = $formdata['limit'];
|
$this->criteria['form']['limit'] = $formdata['limit'];
|
||||||
|
|
||||||
foreach ($formdata as $key=>$val) {
|
foreach ($formdata as $key=>$val) {
|
||||||
if (is_array($val) && strlen($val[2])) {
|
if (is_array($val) && $val['active']) {
|
||||||
$this->criteria['counter']++;
|
$this->criteria['counter']++;
|
||||||
$this->criteria['conditions'][$key] = array('cat' => $this->Base->_formElementDecode($val[0]),
|
$this->criteria['conditions'][$key] = array('cat' => $this->Base->_formElementDecode($val[0]),
|
||||||
'op' => $val[1],
|
'op' => $val[1],
|
||||||
|
@ -132,7 +149,7 @@ class uiSearch
|
||||||
'op' => constant('UI_SIMPLESEARCH_OP'.$n),
|
'op' => constant('UI_SIMPLESEARCH_OP'.$n),
|
||||||
'val' => stripslashes($formdata['criterium'])
|
'val' => stripslashes($formdata['criterium'])
|
||||||
);
|
);
|
||||||
$this->criteria['form']['row_'.$n] = array(0 => $this->Base->_formElementEncode(constant('UI_SIMPLESEARCH_CAT'.$n)),
|
$this->criteria['form']['row_'.$n]= array(0 => $this->Base->_formElementEncode(constant('UI_SIMPLESEARCH_CAT'.$n)),
|
||||||
1 => constant('UI_SIMPLESEARCH_OP'.$n),
|
1 => constant('UI_SIMPLESEARCH_OP'.$n),
|
||||||
2 => stripslashes($formdata['criterium'])
|
2 => stripslashes($formdata['criterium'])
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue