*** empty log message ***
This commit is contained in:
parent
1b211176e8
commit
f9ec998d96
34 changed files with 396 additions and 239 deletions
|
@ -1,16 +1,19 @@
|
||||||
<?php
|
<?php
|
||||||
$Smarty->register_object('UIBROWSER', $uiBrowser);
|
$Smarty->register_object('UIBROWSER', $uiBrowser);
|
||||||
$Smarty->register_object('BROWSE', $uiBrowser->BROWSE);
|
$Smarty->register_object('BROWSE', $uiBrowser->BROWSE);
|
||||||
$Smarty->register_object('SEARCH', $uiBrowser->SEARCH);
|
$Smarty->register_object('SEARCH', $uiBrowser->SEARCH);
|
||||||
$Smarty->assign_by_ref ('PL', $uiBrowser->PLAYLIST);
|
$Smarty->assign_by_ref ('PL', $uiBrowser->PLAYLIST);
|
||||||
$Smarty->assign_by_ref ('SCHEDULER', $uiBrowser->SCHEDULER);
|
$Smarty->assign_by_ref ('SCHEDULER', $uiBrowser->SCHEDULER);
|
||||||
|
$Smarty->assign_by_ref ('SCRATCHPAD', $uiBrowser->SCRATCHPAD);
|
||||||
$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->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->register_function('getHour', 'S_getHour');
|
||||||
|
$Smarty->register_function('getMinute', 'S_getMinute');
|
||||||
|
$Smarty->register_function('getSecond', 'S_getSecond');
|
||||||
|
|
||||||
// --- Smarty Extensions ---
|
// --- Smarty Extensions ---
|
||||||
/**
|
/**
|
||||||
|
@ -60,20 +63,6 @@ function S_htmlspecialchars($param)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* system
|
|
||||||
*
|
|
||||||
* Execute some PHP-code.
|
|
||||||
*
|
|
||||||
* @param code string, code to execute
|
|
||||||
*/
|
|
||||||
function S_system($param)
|
|
||||||
{
|
|
||||||
extract($param);
|
|
||||||
eval($code);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tra
|
* tra
|
||||||
*
|
*
|
||||||
|
@ -87,4 +76,29 @@ function S_tra($param)
|
||||||
|
|
||||||
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]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function S_getHour($param)
|
||||||
|
{
|
||||||
|
## input format is HH:MM:SS.dddddd
|
||||||
|
extract ($param);
|
||||||
|
list ($h, $m, $s) = explode (':', $time);
|
||||||
|
return $h;
|
||||||
|
}
|
||||||
|
|
||||||
|
function S_getMinute($param)
|
||||||
|
{
|
||||||
|
## input format is HH:MM:SS.dddddd
|
||||||
|
extract ($param);
|
||||||
|
list ($h, $m, $s) = explode (':', $time);
|
||||||
|
return $m;
|
||||||
|
}
|
||||||
|
|
||||||
|
function S_getSecond($param)
|
||||||
|
{
|
||||||
|
## input format is HH:MM:SS.dddddd
|
||||||
|
extract ($param);
|
||||||
|
list ($h, $m, $s) = explode (':', $time);
|
||||||
|
return $s;
|
||||||
|
}
|
||||||
?>
|
?>
|
|
@ -88,7 +88,6 @@ if (is_array($_REQUEST['popup'])){
|
||||||
|
|
||||||
if ($uiBrowser->userid) {
|
if ($uiBrowser->userid) {
|
||||||
$Smarty->assign('showMenuTop', TRUE);
|
$Smarty->assign('showMenuTop', TRUE);
|
||||||
$Smarty->assign('SCRATCHPAD', $uiBrowser->SCRATCHPAD->get());
|
|
||||||
|
|
||||||
switch ($_REQUEST['act']){
|
switch ($_REQUEST['act']){
|
||||||
case "fileList":
|
case "fileList":
|
||||||
|
@ -104,7 +103,7 @@ if ($uiBrowser->userid) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "permissions":
|
case "permissions":
|
||||||
$Smarty->assign('structure', $uiBrowser->getStructure($uiBrowser->id));
|
$Smarty->assign('structure', $uiBrowser->getStructure($uiBrowser->id));
|
||||||
$Smarty->assign('permissions', $uiBrowser->permissions($uiBrowser->id));
|
$Smarty->assign('permissions', $uiBrowser->permissions($uiBrowser->id));
|
||||||
$Smarty->assign('fileList', TRUE);
|
$Smarty->assign('fileList', TRUE);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -256,6 +256,11 @@ switch($_REQUEST['act']){
|
||||||
$uiHandler->SCHEDULER->setReload();
|
$uiHandler->SCHEDULER->setReload();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "SCHEDULER.setScheduleTime":
|
||||||
|
$uiHandler->SCHEDULER->setScheduleTime($_REQUEST);
|
||||||
|
$uiHandler->SCHEDULER->setClose();
|
||||||
|
break;
|
||||||
|
|
||||||
case "SCHEDULER.addItem":
|
case "SCHEDULER.addItem":
|
||||||
$uiHandler->SCHEDULER->uploadPlaylistMethod($_REQUEST);
|
$uiHandler->SCHEDULER->uploadPlaylistMethod($_REQUEST);
|
||||||
$uiHandler->SCHEDULER->setReload();
|
$uiHandler->SCHEDULER->setReload();
|
||||||
|
|
|
@ -486,6 +486,10 @@
|
||||||
<key>Item</key>
|
<key>Item</key>
|
||||||
<value>Položka</value>
|
<value>Položka</value>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<key>Insert Playlist after previous</key>
|
||||||
|
<value />
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>Label</key>
|
<key>Label</key>
|
||||||
<value>Název</value>
|
<value>Název</value>
|
||||||
|
|
|
@ -486,6 +486,10 @@
|
||||||
<key>Item</key>
|
<key>Item</key>
|
||||||
<value>Element</value>
|
<value>Element</value>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<key>Insert Playlist after previous</key>
|
||||||
|
<value />
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>Label</key>
|
<key>Label</key>
|
||||||
<value />
|
<value />
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<language>
|
<language>
|
||||||
|
<status />
|
||||||
<Id>en_GB</Id>
|
<Id>en_GB</Id>
|
||||||
<item>
|
<item>
|
||||||
<key>Are you sure to delete file "$1"?</key>
|
<key>Are you sure to delete file "$1"?</key>
|
||||||
|
@ -485,6 +486,10 @@
|
||||||
<key>Insert Playlist here</key>
|
<key>Insert Playlist here</key>
|
||||||
<value>Insert playlist here</value>
|
<value>Insert playlist here</value>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<key>Insert Playlist after previous</key>
|
||||||
|
<value />
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>Item</key>
|
<key>Item</key>
|
||||||
<value>Item</value>
|
<value>Item</value>
|
||||||
|
|
|
@ -486,6 +486,10 @@
|
||||||
<key>Item</key>
|
<key>Item</key>
|
||||||
<value>Elemento</value>
|
<value>Elemento</value>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<key>Insert Playlist after previous</key>
|
||||||
|
<value />
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>Label</key>
|
<key>Label</key>
|
||||||
<value>Sello</value>
|
<value>Sello</value>
|
||||||
|
|
|
@ -486,6 +486,10 @@
|
||||||
<key>Item</key>
|
<key>Item</key>
|
||||||
<value />
|
<value />
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<key>Insert Playlist after previous</key>
|
||||||
|
<value />
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>Label</key>
|
<key>Label</key>
|
||||||
<value />
|
<value />
|
||||||
|
|
|
@ -486,6 +486,10 @@
|
||||||
<key>Item</key>
|
<key>Item</key>
|
||||||
<value>Item</value>
|
<value>Item</value>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<key>Insert Playlist after previous</key>
|
||||||
|
<value />
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>Label</key>
|
<key>Label</key>
|
||||||
<value>Omschrijving</value>
|
<value>Omschrijving</value>
|
||||||
|
|
|
@ -486,6 +486,10 @@
|
||||||
<key>Item</key>
|
<key>Item</key>
|
||||||
<value>Stavka</value>
|
<value>Stavka</value>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<key>Insert Playlist after previous</key>
|
||||||
|
<value />
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>Label</key>
|
<key>Label</key>
|
||||||
<value />
|
<value />
|
||||||
|
|
|
@ -33,20 +33,25 @@
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="footer" style="width: 535px;">
|
<div class="footer" style="width: 530px;">
|
||||||
|
|
||||||
<div class="counter">
|
<div class="counter">
|
||||||
{if $_results.prev}<a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.setOffset&page=prev', 'pager')" id="blue_head">##previous##</a>{/if}
|
{* {if $_results.prev}<a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.setOffset&page=prev', 'pager')" id="blue_head">##previous##</a>{/if} *}
|
||||||
|
|
||||||
{foreach from=$_results.pagination item=p key=k}
|
{foreach from=$_results.pagination item=p key=k}
|
||||||
<a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.setOffset&page={$k}', 'pager')" id="blue_head">{$p}</a>
|
{if $k != $_results.page+1}
|
||||||
|
<a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.setOffset&page={$k}', 'pager')" id="blue_head">{$p}</a>
|
||||||
|
{else}
|
||||||
|
{$p}
|
||||||
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
||||||
{if $_results.next}<a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.setOffset&page=next', 'pager')" id="blue_head">##next##</a>{/if}
|
{* {if $_results.next}<a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.setOffset&page=next', 'pager')" id="blue_head">##next##</a>{/if} *}
|
||||||
|
|
||||||
##Count##: {$_results.cnt}
|
##Range##: {$_criteria.offset+1}-{if ($_criteria.offset+$_criteria.limit)>$_results.cnt}{$_results.cnt}{else}{$_criteria.offset+$_criteria.limit}{/if}
|
||||||
##Page##: {$_results.page+1}
|
##Count##: {$_results.cnt}
|
||||||
##Range##: {$_criteria.offset+1}-{if ($_criteria.offset+$_criteria.limit)>$_results.cnt}{$_results.cnt}{else}{$_criteria.offset+$_criteria.limit}{/if}
|
{* ##Page##: {$_results.page+1} *}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<select name="SEARCHRESULTS_multiaction" onChange="collector_submit('SEARCHRESULTS', this.value)">
|
<select name="SEARCHRESULTS_multiaction" onChange="collector_submit('SEARCHRESULTS', this.value)">
|
||||||
|
@ -58,11 +63,11 @@
|
||||||
<option value="PL.create">##New Playlist using this file(s)##</option>
|
<option value="PL.create">##New Playlist using this file(s)##</option>
|
||||||
{/if}
|
{/if}
|
||||||
</select>
|
</select>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
document.forms['SEARCHRESULTS'].elements['SEARCHRESULTS_multiaction'].options[0].selected=true;
|
document.forms['SEARCHRESULTS'].elements['SEARCHRESULTS_multiaction'].options[0].selected=true;
|
||||||
//document.forms['SEARCHRESULTS'].elements['all'].checked = false;
|
//document.forms['SEARCHRESULTS'].elements['all'].checked = false;
|
||||||
//collector_switchAll('SEARCHRESULTS')
|
//collector_switchAll('SEARCHRESULTS')
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{assign var="dynform" value=$simpleSearchForm}
|
{assign var="dynform" value=$simpleSearchForm}
|
||||||
<!-- start library search -->
|
<!-- start library search -->
|
||||||
<div class="container_elements">
|
<div class="container_elements">
|
||||||
<h1>##Library Search##</h1>
|
<h1>##Library Search##</h1>
|
||||||
<form action="ui_handler.php" method="post" name="simplesearch" id="simplesearch"><input name="act" type="hidden" value="SEARCH.simpleSearch" />
|
<form action="ui_handler.php" method="post" name="simplesearch" id="simplesearch"><input name="act" type="hidden" value="SEARCH.simpleSearch" />
|
||||||
<div>
|
<div>
|
||||||
<input size="20" maxlength="50" name="criterium" type="text" style="width: 184px;" />
|
<input size="20" maxlength="50" name="criterium" type="text" style="width: 184px;" />
|
||||||
<input type="button" class="button_small" value="##Go##" />
|
<input type="button" class="button_small" value="##Go##" onClick="submit()"/>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<!-- end library search -->
|
<!-- end library search -->
|
||||||
|
|
|
@ -4,60 +4,65 @@
|
||||||
{include file="menu.tpl"}
|
{include file="menu.tpl"}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{*
|
|
||||||
{if $structure}
|
{if $USER.userid} {* somebody logged in? *}
|
||||||
{include file="file/path.tpl"}
|
|
||||||
{/if}
|
{*
|
||||||
*}
|
{if $structure}
|
||||||
|
{include file="file/path.tpl"}
|
||||||
{if $showScheduler}
|
{/if}
|
||||||
<table style="margin:0px;padding:0px;" border="0"><tr><td valign="top" style="margin:0px;padding:0px;border:0">
|
*}
|
||||||
<div class="content">
|
|
||||||
{include file="scheduler/calendar.tpl"}
|
{if $showScheduler}
|
||||||
{if $SCRATCHPAD}
|
<table style="margin:0px;padding:0px;" border="0"><tr><td valign="top" style="margin:0px;padding:0px;border:0">
|
||||||
{include file="scratchpad/main.tpl"}
|
<div class="content">
|
||||||
{/if}
|
{include file="scheduler/calendar.tpl"}
|
||||||
</div>
|
{if $SCRATCHPAD}
|
||||||
</td><td valign="top" style="margin:0px;padding:0px;border:0">
|
{include file="scratchpad/main.tpl"}
|
||||||
{include file="scheduler/main.tpl"}
|
{/if}
|
||||||
</td></tr></table>
|
</div>
|
||||||
{else}
|
</td><td valign="top" style="margin:0px;padding:0px;border:0">
|
||||||
|
{include file="scheduler/main.tpl"}
|
||||||
{if $fileList}
|
</td></tr></table>
|
||||||
{include file="file/list.tpl"}
|
{else}
|
||||||
{/if}
|
|
||||||
|
{if $fileList}
|
||||||
{if $showLibrary}
|
{include file="file/list.tpl"}
|
||||||
{include file="library/main.tpl"}
|
{/if}
|
||||||
{/if}
|
|
||||||
|
{if $showLibrary}
|
||||||
{if $showSubjects}
|
{include file="library/main.tpl"}
|
||||||
{include file="subjects.tpl"}
|
{/if}
|
||||||
{/if}
|
|
||||||
|
{if $showSubjects}
|
||||||
{if $showFile}
|
{include file="subjects.tpl"}
|
||||||
{include file="file/data.tpl"}
|
{/if}
|
||||||
{/if}
|
|
||||||
|
{if $showFile}
|
||||||
{if $editItem}
|
{include file="file/data.tpl"}
|
||||||
{include file="file/edit.tpl"}
|
{/if}
|
||||||
{/if}
|
|
||||||
|
{if $editItem}
|
||||||
{if $changeStationPrefs}
|
{include file="file/edit.tpl"}
|
||||||
{include file="stationprefs.tpl"}
|
{/if}
|
||||||
{/if}
|
|
||||||
|
{if $changeStationPrefs}
|
||||||
{if $PL_simpleManagement}
|
{include file="stationprefs.tpl"}
|
||||||
{include file="playlist/main.tpl"}
|
{/if}
|
||||||
{/if}
|
|
||||||
|
{if $PL_simpleManagement}
|
||||||
<div class="content">
|
{include file="playlist/main.tpl"}
|
||||||
{if $simpleSearchForm}
|
{/if}
|
||||||
{include file="library/simpleSearchForm.tpl"}
|
|
||||||
{/if}
|
<div class="content">
|
||||||
|
{if $simpleSearchForm}
|
||||||
{if $SCRATCHPAD}
|
{include file="library/simpleSearchForm.tpl"}
|
||||||
{include file="scratchpad/main.tpl"}
|
{/if}
|
||||||
{/if}
|
|
||||||
</div>
|
{if $SCRATCHPAD}
|
||||||
|
{include file="scratchpad/main.tpl"}
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{include file="popup/header.tpl"}
|
{include file="popup/header.tpl"}
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
<b>##Are you sure to delete active Playlist?##</b>
|
##Are you sure to delete active Playlist?##
|
||||||
<br><br>
|
<br><br>
|
||||||
<input type="button" class="button" onClick="window.close()" value="Cancel">
|
<input type="button" class="button" onClick="window.close()" value="Cancel">
|
||||||
<input type="button" class="button" onClick="location.href='{$UI_HANDLER}?act=PL.deleteActive'" value="OK">
|
<input type="button" class="button" onClick="location.href='{$UI_HANDLER}?act=PL.deleteActive'" value="OK">
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{include file="popup/header.tpl"}
|
{include file="popup/header.tpl"}
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
<b>##Do you want to save changes?##</b>
|
##Do you want to save changes?##
|
||||||
<br><br>
|
<br><br>
|
||||||
<input type="button" class="button" onClick="window.close()" value="Cancel">
|
<input type="button" class="button" onClick="window.close()" value="Cancel">
|
||||||
<input type="button" class="button" onClick="location.href='{$UI_HANDLER}?act=PL.revertANDclose'" value="No">
|
<input type="button" class="button" onClick="location.href='{$UI_HANDLER}?act=PL.revertANDclose'" value="No">
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{include file="popup/header.tpl"}
|
{include file="popup/header.tpl"}
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
<b>##Are you sure to discard all changes?##</b>
|
##Are you sure to discard all changes?##
|
||||||
<br><br>
|
<br><br>
|
||||||
<input type="button" class="button" onClick="window.close()" value="Cancel">
|
<input type="button" class="button" onClick="window.close()" value="Cancel">
|
||||||
<input type="button" class="button" onClick="location.href='{$UI_HANDLER}?act=PL.revert'" value="OK">
|
<input type="button" class="button" onClick="location.href='{$UI_HANDLER}?act=PL.revert'" value="OK">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{include file="popup/header.tpl"}
|
{include file="popup/header.tpl"}
|
||||||
|
|
||||||
{if $SCHEDULER->_copyPlFromSP()}
|
{if $SCHEDULER->copyPlFromSP()}
|
||||||
{assign var="dynform" value=$SCHEDULER->getScheduleForm()}
|
{assign var="dynform" value=$SCHEDULER->getScheduleForm()}
|
||||||
<table height="100%" width="100%">
|
<table height="100%" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
</table>
|
</table>
|
||||||
{else}
|
{else}
|
||||||
<center>
|
<center>
|
||||||
##You need to have at least one inactive playlist on ScratchPad to schedule it.##
|
##You need to have at least one non-open playlist on ScratchPad to schedule it.##
|
||||||
</center>
|
</center>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{include file="popup/header.tpl"}
|
{include file="popup/header.tpl"}
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
<b>{tra 0='Are you sure to remove playlist "$1"?' 1=$plname}</b>
|
{tra 0='Are you sure to remove playlist "$1"?' 1=$plname}
|
||||||
<br><br>
|
<br><br>
|
||||||
<input type="button" class="button" onClick="window.close()" value="Cancel">
|
<input type="button" class="button" onClick="window.close()" value="Cancel">
|
||||||
<input type="button" class="button" onClick="location.href='{$UI_HANDLER}?act=SCHEDULER.removeItem&scheduleId={$scheduleId}'" value="OK">
|
<input type="button" class="button" onClick="location.href='{$UI_HANDLER}?act=SCHEDULER.removeItem&scheduleId={$scheduleId}'" value="OK">
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{include file="popup/header.tpl"}
|
{include file="popup/header.tpl"}
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
<b>{tra 0='Are you sure to delete file "$1"?' 1=$filename}</b>
|
{tra 0='Are you sure to delete file "$1"?' 1=$filename}
|
||||||
<br><br>
|
<br><br>
|
||||||
<input type="button" class="button" onClick="window.close()" value="Cancel">
|
<input type="button" class="button" onClick="window.close()" value="Cancel">
|
||||||
<input type="button" class="button" onClick="location.href='{$UI_HANDLER}?act=delete&id={$id}'" value="OK">
|
<input type="button" class="button" onClick="location.href='{$UI_HANDLER}?act=delete&id={$id}'" value="OK">
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{include file="popup/header.tpl"}
|
{include file="popup/header.tpl"}
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
<b>{tra 0='Are you sure to logout $1?' 1=$USER.login}</b>
|
{tra 0='Are you sure to logout $1?' 1=$USER.login}
|
||||||
<br><br>
|
<br><br>
|
||||||
<input type="button" class="button" value="{tra 0=Cancel}" onclick="javascript: window.close()">
|
<input type="button" class="button" value="{tra 0=Cancel}" onclick="javascript: window.close()">
|
||||||
<input type="button" class="button" value="{tra 0=OK}" onclick="javascript: location.href='{$UI_HANDLER}?act={$logouttype}'">
|
<input type="button" class="button" value="{tra 0=OK}" onclick="javascript: location.href='{$UI_HANDLER}?act={$logouttype}'">
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
<td class="firstrow" style="border-left: 1px solid #ccc">{$_hour}</td>
|
<td class="firstrow" style="border-left: 1px solid #ccc">{$_hour}</td>
|
||||||
{foreach from=$SCHEDULER->Week item="_day"}
|
{foreach from=$SCHEDULER->Week item="_day"}
|
||||||
{if is_array($_entrys[$_day.day][$_hour])}
|
{if is_array($_entrys[$_day.day][$_hour])}
|
||||||
<td class="date_full" onClick="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={$_hour}', 'SCHEDULER.addItem')"></td>
|
<td class="date_full" {include file="scheduler/context_week.tpl"}></td>
|
||||||
<td class="day_full">
|
<td class="day_full">
|
||||||
{foreach from=$_entrys[$_day.day][$_hour] item="i"}
|
{foreach from=$_entrys[$_day.day][$_hour] item="i"}
|
||||||
<div {include file="scheduler/actionhandler.tpl"}>
|
<div {include file="scheduler/actionhandler.tpl"}>
|
||||||
|
@ -54,11 +54,12 @@
|
||||||
<p>{$i.start|truncate:5:""} - {$i.end|truncate:5:""}</p>
|
<p>{$i.start|truncate:5:""} - {$i.end|truncate:5:""}</p>
|
||||||
<p>{$i.creator}</p>
|
<p>{$i.creator}</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="background-color: #FF6F1F; height: 3px" onClick="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={getHour time=$i.end}&minute={getMinute time=$i.end}&second={getSecond time=$i.end}', 'SCHEDULER.addNextItem')" ></div>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</td>
|
</td>
|
||||||
{else}
|
{else}
|
||||||
<td class="date" onClick="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={$_hour}', 'SCHEDULER.addItem')"></td>
|
<td class="date" {include file="scheduler/context_week.tpl"}></td>
|
||||||
<td class="day" onClick="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={$_hour}', 'SCHEDULER.addItem')"></td>
|
<td class="day" {include file="scheduler/context_week.tpl"}></td>
|
||||||
{/if}
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
onClick="hidealttextnow(); return contextmenu('{$i.id}'
|
onClick="hidealttextnow(); return contextmenu('{$i.id}'
|
||||||
, 'SP.removeItem'
|
, 'SP.removeItem'
|
||||||
|
|
||||||
{if $i.type|lower == 'audioclip'}
|
{if $i.type === 'audioclip'}
|
||||||
, 'listen', '{$i.gunid}'
|
, 'listen', '{$i.gunid}'
|
||||||
{if $_PL_activeId}
|
{if $_PL_activeId}
|
||||||
, 'PL.addItem'
|
, 'PL.addItem'
|
||||||
|
@ -12,7 +12,7 @@ onClick="hidealttextnow(); return contextmenu('{$i.id}'
|
||||||
, 'edit', 'delete'
|
, 'edit', 'delete'
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if $i.type|lower == 'webstream'}
|
{if $i.type === 'webstream'}
|
||||||
{if $_PL_activeId}
|
{if $_PL_activeId}
|
||||||
, 'PL.addItem'
|
, 'PL.addItem'
|
||||||
{else}
|
{else}
|
||||||
|
@ -21,14 +21,14 @@ onClick="hidealttextnow(); return contextmenu('{$i.id}'
|
||||||
, 'edit', 'delete'
|
, 'edit', 'delete'
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if $i.type|lower == 'playlist'}
|
{if $i.type === 'playlist'}
|
||||||
{if $_PL_activeId}
|
{if $_PL_activeId}
|
||||||
{if $_PL_activeId == $i.id}
|
{if $_PL_activeId === $i.id}
|
||||||
, 'PL.release'
|
, 'PL.release'
|
||||||
{else}
|
{elseif $PL->isAvailable($i.id) === TRUE}
|
||||||
, 'PL.addItem', 'delete'
|
, 'PL.addItem', 'delete'
|
||||||
{/if}
|
{/if}
|
||||||
{else}
|
{elseif $PL->isAvailable($i.id) === TRUE}
|
||||||
, 'PL.activate', 'PL.create', 'delete'
|
, 'PL.activate', 'PL.create', 'delete'
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
{assign var="_PL_activeId" value=$PL->getActiveId()}
|
{assign var="_PL_activeId" value=$PL->getActiveId()}
|
||||||
|
{assign var="SCRATCHPAD" value=$SCRATCHPAD->get()}
|
||||||
|
|
||||||
<!-- start scratch pad -->
|
<!-- start scratch pad -->
|
||||||
{if is_array($SCRATCHPAD)}
|
|
||||||
<form name="SP">
|
<form name="SP">
|
||||||
<div class="container_elements">
|
<div class="container_elements">
|
||||||
<h1>##ScratchPad##</h1>
|
<h1>##ScratchPad##</h1>
|
||||||
<div class="head" style="width:255px; height: 21px;"> </div>
|
<div class="head" style="width:255px; height: 21px;"> </div>
|
||||||
<div class="container_table" style="width:275px;">
|
<div class="container_table" style="width:275px;">
|
||||||
<table style="width:255px;">
|
<table style="width:255px;">
|
||||||
|
|
||||||
<!-- start table header -->
|
<!-- start table header -->
|
||||||
<tr class="blue_head">
|
<tr class="blue_head">
|
||||||
<td style="width: 30px"><input type="checkbox" name="all" onClick="collector_switchAll('SP')"></td>
|
<td style="width: 30px"><input type="checkbox" name="all" onClick="collector_switchAll('SP')"></td>
|
||||||
|
@ -17,26 +18,43 @@
|
||||||
</tr>
|
</tr>
|
||||||
<!-- end table header -->
|
<!-- end table header -->
|
||||||
|
|
||||||
{foreach from=$SCRATCHPAD item=i}
|
{if count($SCRATCHPAD) >= 1}
|
||||||
|
{foreach from=$SCRATCHPAD item=i}
|
||||||
<!-- start item -->
|
<!-- start item -->
|
||||||
<tr class="{cycle values='blue1, blue2'}">
|
<tr class="{cycle values='blue1, blue2'}">
|
||||||
<td><input type="checkbox" class="checkbox" name="{$i.id}"/></td>
|
<td><input type="checkbox" class="checkbox" name="{$i.id}"/></td>
|
||||||
<td {include file="scratchpad/actionhandler.tpl"}>
|
<td {include file="scratchpad/actionhandler.tpl"}>
|
||||||
{if $_PL_activeId == $i.id}
|
{if $i.type === "playlist"}
|
||||||
<b>{$i.title|truncate:12}</b>
|
{if $PL->isAvailable($i.id) === FALSE}
|
||||||
|
<div style="text-decoration : line-through">
|
||||||
|
{else}
|
||||||
|
<div>
|
||||||
|
{/if}
|
||||||
|
{if $_PL_activeId === $i.id}
|
||||||
|
<div style="font-weight : bold">
|
||||||
|
{else}
|
||||||
|
<div>
|
||||||
|
{/if}
|
||||||
|
{$i.title|truncate:12}
|
||||||
|
</div></div>
|
||||||
{else}
|
{else}
|
||||||
{$i.title|truncate:12}
|
{$i.title|truncate:12}
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
<td {include file="scratchpad/actionhandler.tpl"}>{$i.duration}</td>
|
<td {include file="scratchpad/actionhandler.tpl"}>{$i.duration}</td>
|
||||||
<td {include file="scratchpad/actionhandler.tpl"} style="border: 0"><img src="img/{$i.type|lower}.gif" border="0" alt="{$i.type|lower|capitalize}" /></td>
|
<td {include file="scratchpad/actionhandler.tpl"} style="border: 0"><img src="img/{$i.type}.gif" border="0" alt="{$i.type|capitalize}" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
|
||||||
<!-- end item -->
|
<!-- end item -->
|
||||||
|
{/foreach}
|
||||||
|
{else}
|
||||||
|
<tr class="blue1">
|
||||||
|
<td style="border: 0" colspan="4" align="center">##empty##</td>
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer" style="width:255px;">
|
<div class="footer" style="width:250px;">
|
||||||
<select name="SP_multiaction" onChange="collector_submit('SP', this.value)">
|
<select name="SP_multiaction" onChange="collector_submit('SP', this.value)">
|
||||||
<option>##Multiple Action:##</option>
|
<option>##Multiple Action:##</option>
|
||||||
<option value="SP.removeItem">##Remove file(s)##</option>
|
<option value="SP.removeItem">##Remove file(s)##</option>
|
||||||
|
@ -53,9 +71,9 @@
|
||||||
</script>
|
</script>
|
||||||
<a href="#" onClick="collector_clearAll('SP', 'SP.removeItem')" id="blue_head">##Clear##</a>
|
<a href="#" onClick="collector_clearAll('SP', 'SP.removeItem')" id="blue_head">##Clear##</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{/if}
|
|
||||||
<!-- end scratch pad -->
|
<!-- end scratch pad -->
|
||||||
|
|
||||||
{assign var="_PL_activeId" value=NULL}
|
{assign var="_PL_activeId" value=NULL}
|
||||||
|
|
|
@ -94,7 +94,11 @@
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "SCHEDULER.addItem":
|
case "SCHEDULER.addItem":
|
||||||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href='#' onClick=\"hpopup('{$UI_HANDLER}?act=SCHEDULER.set&"+param+"'); popup('{$UI_BROWSER}?popup[]=SCHEDULER.addItem', 'Schedule', 420, 200)\"')"+oF+"> ##Insert Playlist here## </a></li>";
|
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href='#' onClick=\"hpopup('{$UI_HANDLER}?act=SCHEDULER.setScheduleTime&"+param+"'); popup('{$UI_BROWSER}?popup[]=SCHEDULER.addItem', 'Schedule', 420, 200)\"')"+oF+"> ##Insert Playlist here## </a></li>";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "SCHEDULER.addNextItem":
|
||||||
|
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href='#' onClick=\"hpopup('{$UI_HANDLER}?act=SCHEDULER.setScheduleTime&"+param+"'); popup('{$UI_BROWSER}?popup[]=SCHEDULER.addItem', 'Schedule', 420, 200)\"')"+oF+"> ##Insert Playlist after previous## </a></li>";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "SCHEDULER.removeItem":
|
case "SCHEDULER.removeItem":
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
{*Smarty template*}
|
|
||||||
|
|
||||||
{if $USER.userid}
|
{if $USER.userid}
|
||||||
<div class="loginname">##Signed in## : {$USER.login}</div>
|
<div class="loginname">##Signed in## : {$USER.login}</div>
|
||||||
<input type="button" class="button" value="{tra 0=logout}" onClick='javascript: popup("{$UI_BROWSER}?popup[]=logout", "name", "400", "50");'/>
|
<input type="button" class="button" value="{tra 0=logout}" onClick='javascript: popup("{$UI_BROWSER}?popup[]=logout", "name", "400", "50");'/>
|
||||||
|
|
|
@ -326,12 +326,14 @@ class uiBase
|
||||||
|
|
||||||
function _getMetaInfo($id)
|
function _getMetaInfo($id)
|
||||||
{
|
{
|
||||||
|
$type = strtolower($this->gb->getFileType($id));
|
||||||
$data = array('id' => $id,
|
$data = array('id' => $id,
|
||||||
'gunid' => $this->gb->_gunidFromId($id),
|
'gunid' => $this->gb->_gunidFromId($id),
|
||||||
'title' => $this->_getMDataValue($id, UI_MDATA_KEY_TITLE),
|
'title' => $this->_getMDataValue($id, UI_MDATA_KEY_TITLE),
|
||||||
'creator' => $this->_getMDataValue($id, UI_MDATA_KEY_CREATOR),
|
'creator' => $this->_getMDataValue($id, UI_MDATA_KEY_CREATOR),
|
||||||
'duration' => $this->_niceTime($this->_getMDataValue($id, UI_MDATA_KEY_DURATION)),
|
'duration' => $this->_niceTime($this->_getMDataValue($id, UI_MDATA_KEY_DURATION)),
|
||||||
'type' => $this->gb->getFileType($id),
|
'type' => $type,
|
||||||
|
#'isAvailable' => $type == 'playlist' ? $this->gb->playlistIsAvailable($id, $this->sessid) : NULL,
|
||||||
);
|
);
|
||||||
return ($data);
|
return ($data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ class uiBrowse
|
||||||
#$this->results =& $_SESSION[UI_BROWSE_SESSNAME]['results'];
|
#$this->results =& $_SESSION[UI_BROWSE_SESSNAME]['results'];
|
||||||
$this->reloadUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
|
$this->reloadUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
|
||||||
|
|
||||||
$this->criteria['limit'] ? NULL : $this->criteria['limit'] = 10;
|
$this->criteria['limit'] ? NULL : $this->criteria['limit'] = UI_BROWSE_DEFAULT_LIMIT;
|
||||||
|
|
||||||
if (!is_array($this->col)) {
|
if (!is_array($this->col)) {
|
||||||
$this->setDefaults();
|
$this->setDefaults();
|
||||||
|
@ -21,22 +21,21 @@ class uiBrowse
|
||||||
$this->Base->redirUrl = $this->reloadUrl;
|
$this->Base->redirUrl = $this->reloadUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function setDefaults($reload=FALSE)
|
function setDefaults($reload=FALSE)
|
||||||
{
|
{
|
||||||
$this->col[1]['category'] = 'dc:type';
|
$this->col[1]['category'] = UI_BROWSE_DEFAULT_KEY_1;
|
||||||
$this->col[1]['value'][0] = '%%all%%';
|
$this->col[1]['value'][0] = '%%all%%';
|
||||||
$this->col[2]['category'] = 'dc:creator';
|
$this->col[2]['category'] = UI_BROWSE_DEFAULT_KEY_2;
|
||||||
$this->col[2]['value'][0] = '%%all%%';
|
$this->col[2]['value'][0] = '%%all%%';
|
||||||
$this->col[3]['category'] = 'dc:source';
|
$this->col[3]['category'] = UI_BROWSE_DEFAULT_KEY_3;
|
||||||
$this->col[3]['value'][0] = '%%all%%';
|
$this->col[3]['value'][0] = '%%all%%';
|
||||||
for ($col=1; $col<=3; $col++) {
|
for ($col=1; $col<=3; $col++) {
|
||||||
$this->setCategory(array('col' => $col, 'category' => $this->col[$col]['category'], 'value' => array(0=>'%%all%%')));
|
$this->setCategory(array('col' => $col, 'category' => $this->col[$col]['category'], 'value' => array(0 => '%%all%%')));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setValue(array('col' => 1,
|
$this->setValue(array('col' => 1,
|
||||||
'category' => 'dc:type',
|
'category' => UI_BROWSE_DEFAULTKEY_1,
|
||||||
'value' => Array(0 => '%%all%%')
|
'value' => Array(0 => '%%all%%')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -183,7 +182,7 @@ class uiBrowse
|
||||||
(
|
(
|
||||||
'id' => 24,
|
'id' => 24,
|
||||||
'gunid' => '1cc472228d0cb2ac',
|
'gunid' => '1cc472228d0cb2ac',
|
||||||
'title' => 'Strom 10min',
|
'title' => 'Item '.$n,
|
||||||
'creator' => 'Sebastian',
|
'creator' => 'Sebastian',
|
||||||
'duration' => ' 10:00',
|
'duration' => ' 10:00',
|
||||||
'type' => 'webstream'
|
'type' => 'webstream'
|
||||||
|
@ -193,6 +192,7 @@ class uiBrowse
|
||||||
$this->results['cnt'] = $results['cnt'];
|
$this->results['cnt'] = $results['cnt'];
|
||||||
## end test
|
## end test
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$this->pagination($results);
|
$this->pagination($results);
|
||||||
#print_r($this->criteria);
|
#print_r($this->criteria);
|
||||||
#print_r($this->results);
|
#print_r($this->results);
|
||||||
|
@ -205,17 +205,31 @@ class uiBrowse
|
||||||
if (sizeof($this->results['items']) == 0) {
|
if (sizeof($this->results['items']) == 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
$currp = ($this->criteria['offset']/$this->criteria['limit']) + 1; # current page
|
$delta = 4;
|
||||||
$maxp = ceil($results['cnt'] / $this->criteria['limit']); # maximum page
|
$currp = ($this->criteria['offset'] / $this->criteria['limit']) + 1; # current page
|
||||||
|
$maxp = ceil($results['cnt'] / $this->criteria['limit']); # maximum page
|
||||||
|
|
||||||
|
/*
|
||||||
for ($n = 1; $n <= $maxp; $n = $n+$width) {
|
for ($n = 1; $n <= $maxp; $n = $n+$width) {
|
||||||
$width = pow(10, floor(($n)/10));
|
$width = pow(10, floor(($n)/10));
|
||||||
$this->results['pagination'][$n] = $n;
|
$this->results['pagination'][$n] = $n;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
$deltaLower = UI_BROWSERESULTS_DELTA;
|
||||||
|
$deltaUpper = UI_BROWSERESULTS_DELTA;
|
||||||
|
$start = $currp;
|
||||||
|
|
||||||
|
if ($start+$delta-$maxp > 0) $deltaLower += $start+$delta-$maxp; ## correct lower boarder if page is near end
|
||||||
|
|
||||||
|
for ($n = $start-$deltaLower; $n <= $start+$deltaUpper; $n++) {
|
||||||
|
if ($n <= 0) $deltaUpper++; ## correct upper boarder if page is near zero
|
||||||
|
elseif ($n <= $maxp) $this->results['pagination'][$n] = $n;
|
||||||
|
}
|
||||||
|
|
||||||
#array_pop($this->results['pagination']);
|
#array_pop($this->results['pagination']);
|
||||||
$this->results['pagination'][1] = '|<<';
|
$this->results['pagination'][1] ? NULL : $this->results['pagination'][1] = '|<<';
|
||||||
$this->results['pagination'][$maxp] = '>>|';
|
$this->results['pagination'][$maxp] ? NULL : $this->results['pagination'][$maxp] = '>>|';
|
||||||
$this->results['next'] = $results['cnt'] > $this->criteria['offset'] + $this->criteria['limit'] ? TRUE : FALSE;
|
$this->results['next'] = $results['cnt'] > $this->criteria['offset'] + $this->criteria['limit'] ? TRUE : FALSE;
|
||||||
$this->results['prev'] = $this->criteria['offset'] > 0 ? TRUE : FALSE;
|
$this->results['prev'] = $this->criteria['offset'] > 0 ? TRUE : FALSE;
|
||||||
ksort($this->results['pagination']);
|
ksort($this->results['pagination']);
|
||||||
|
@ -263,6 +277,7 @@ class uiBrowse
|
||||||
function setFiletype($filetype)
|
function setFiletype($filetype)
|
||||||
{
|
{
|
||||||
$this->criteria['filetype'] = $filetype;
|
$this->criteria['filetype'] = $filetype;
|
||||||
|
$this->criteria['offset'] = 0;
|
||||||
$this->setReload();
|
$this->setReload();
|
||||||
#$this->searchDB();
|
#$this->searchDB();
|
||||||
}
|
}
|
||||||
|
|
|
@ -317,13 +317,14 @@ class uiBrowser extends uiBase {
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function permissions($id)
|
function permissions($id)
|
||||||
{
|
{
|
||||||
return array('pathdata' => $this->gb->getPath($id),
|
return array('pathdata' => $this->gb->getPath($id),
|
||||||
'perms' => $this->gb->getObjPerms($id),
|
'perms' => $this->gb->getObjPerms($id),
|
||||||
'actions' => $this->gb->getAllowedActions($this->gb->getObjType($id)),
|
'actions' => $this->gb->getAllowedActions($this->gb->getObjType($id)),
|
||||||
'subjects' => $this->gb->getSubjects(),
|
'subjects' => $this->gb->getSubjects(),
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
'loggedAs' => $this->login);
|
'loggedAs' => $this->login
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,59 +7,75 @@ 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
|
||||||
define('UI_HANDLER', 'ui_handler.php');
|
define('UI_HANDLER', 'ui_handler.php');
|
||||||
define('UI_BROWSER', 'ui_browser.php');
|
define('UI_BROWSER', 'ui_browser.php');
|
||||||
define('UI_FORM_STANDARD_METHOD', 'POST');
|
|
||||||
define('UI_INPUT_STANDARD_SIZE', 20);
|
## HTML Form stuff
|
||||||
define('UI_INPUT_STANDARD_MAXLENGTH', 50);
|
define('UI_FORM_STANDARD_METHOD', 'POST');
|
||||||
define('UI_TEXTAREA_STANDART_ROWS', 5);
|
define('UI_INPUT_STANDARD_SIZE', 20);
|
||||||
define('UI_TEXTAREA_STANDART_COLS', 17);
|
define('UI_INPUT_STANDARD_MAXLENGTH', 50);
|
||||||
define('UI_BUTTON_STYLE', 'button');
|
define('UI_TEXTAREA_STANDART_ROWS', 5);
|
||||||
define('UI_QFORM_REQUIRED', '../templates/sub/form_required.tpl');
|
define('UI_TEXTAREA_STANDART_COLS', 17);
|
||||||
define('UI_QFORM_REQUIREDNOTE', '../templates/sub/form_requirednote.tpl');
|
define('UI_BUTTON_STYLE', 'button');
|
||||||
define('UI_QFORM_ERROR', '../templates/sub/form_error.tpl');
|
define('UI_QFORM_REQUIRED', '../templates/sub/form_required.tpl');
|
||||||
define('UI_SEARCH_MAX_ROWS', 8);
|
define('UI_QFORM_REQUIREDNOTE', '../templates/sub/form_requirednote.tpl');
|
||||||
define('UI_REGEX_URL', '/^(ht|f)tps?:\/\/[^ ]+$/');
|
define('UI_QFORM_ERROR', '../templates/sub/form_error.tpl');
|
||||||
define('UI_PL_ACCESSTOKEN_KEY', 'playlistToken');
|
define('UI_REGEX_URL', '/^(ht|f)tps?:\/\/[^ ]+$/');
|
||||||
define('UI_SCRATCHPAD_KEY', 'djBagContents');
|
|
||||||
define('UI_SCRATCHPAD_MAXLENGTH_KEY', 'djBagMaxlength');
|
## DB ls_pref keys
|
||||||
|
define('UI_PL_ACCESSTOKEN_KEY', 'playlistToken');
|
||||||
|
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_REGEX', '/^[0-9a-f]{16}:[0-9]{4}-[0-9]{2}-[0-9]{2}$/');
|
||||||
|
|
||||||
## Session Keys
|
## Session Keys
|
||||||
define('UI_SCRATCHPAD_SESSNAME', 'SCRATCHPAD');
|
define('UI_SCRATCHPAD_SESSNAME', 'SCRATCHPAD');
|
||||||
define('UI_STATIONINFO_SESSNAME', 'STATIONINFO');
|
define('UI_STATIONINFO_SESSNAME', 'STATIONINFO');
|
||||||
define('UI_SEARCH_SESSNAME', 'L_SEARCH');
|
define('UI_BROWSE_SESSNAME', 'L_BROWSE');
|
||||||
define('UI_PLAYLIST_SESSNAME', 'PLAYLIST');
|
define('UI_SEARCH_SESSNAME', 'L_SEARCH');
|
||||||
define('UI_BROWSE_SESSNAME', 'L_BROWSE');
|
define('UI_PLAYLIST_SESSNAME', 'PLAYLIST');
|
||||||
define('UI_MDATA_REC_SESSNAME', 'MDATAREC');
|
define('UI_MDATA_REC_SESSNAME', 'MDATAREC');
|
||||||
|
|
||||||
## Metadata Keys
|
## Metadata Keys
|
||||||
define('UI_MDATA_KEY_TITLE', 'dc:title');
|
define('UI_MDATA_KEY_TITLE', 'dc:title');
|
||||||
define('UI_MDATA_KEY_CREATOR', 'dc:creator');
|
define('UI_MDATA_KEY_CREATOR', 'dc:creator');
|
||||||
define('UI_MDATA_KEY_DURATION', 'dcterms:extent');
|
define('UI_MDATA_KEY_DURATION', 'dcterms:extent');
|
||||||
define('UI_MDATA_KEY_URL', 'ls:url');
|
define('UI_MDATA_KEY_URL', 'ls:url');
|
||||||
define('UI_MDATA_KEY_FORMAT', 'dc:format');
|
define('UI_MDATA_KEY_FORMAT', 'dc:format');
|
||||||
define('UI_MDATA_KEY_DESCRIPTION','dc:description');
|
define('UI_MDATA_KEY_DESCRIPTION', 'dc:description');
|
||||||
define('UI_MDATA_VALUE_FORMAT_FILE', 'File');
|
define('UI_MDATA_VALUE_FORMAT_FILE', 'File');
|
||||||
define('UI_MDATA_VALUE_FORMAT_STREAM', 'live stream');
|
define('UI_MDATA_VALUE_FORMAT_STREAM', 'live stream');
|
||||||
|
|
||||||
## Simple Search Preferences
|
## Search/Browse preferences
|
||||||
define('UI_SIMPLESEARCH_FILETYPE', 'File');
|
define('UI_SIMPLESEARCH_FILETYPE', 'File');
|
||||||
define('UI_SIMPLESEARCH_OPERATOR', 'OR');
|
define('UI_SIMPLESEARCH_OPERATOR', 'OR');
|
||||||
define('UI_SIMPLESEARCH_LIMIT', 5);
|
define('UI_SIMPLESEARCH_LIMIT', 10);
|
||||||
define('UI_SIMPLESEARCH_ROWS', 3);
|
define('UI_SIMPLESEARCH_ROWS', 3);
|
||||||
define('UI_SIMPLESEARCH_CAT1', 'dc:title');
|
define('UI_SIMPLESEARCH_CAT1', 'dc:title');
|
||||||
define('UI_SIMPLESEARCH_OP1', 'partial');
|
define('UI_SIMPLESEARCH_OP1', 'partial');
|
||||||
define('UI_SIMPLESEARCH_CAT2', 'dc:creator');
|
define('UI_SIMPLESEARCH_CAT2', 'dc:creator');
|
||||||
define('UI_SIMPLESEARCH_OP2', 'partial');
|
define('UI_SIMPLESEARCH_OP2', 'partial');
|
||||||
define('UI_SIMPLESEARCH_CAT3', 'dc:source');
|
define('UI_SIMPLESEARCH_CAT3', 'dc:source');
|
||||||
define('UI_SIMPLESEARCH_OP3', 'partial');
|
define('UI_SIMPLESEARCH_OP3', 'partial');
|
||||||
|
|
||||||
|
define('UI_SEARCH_MAX_ROWS', 8);
|
||||||
|
define('UI_SEARCH_DEFAULT_LIMIT', 10);
|
||||||
|
define('UI_SEARCHRESULTS_DELTA', 4);
|
||||||
|
|
||||||
|
define('UI_BROWSERESULTS_DELTA', 4);
|
||||||
|
define('UI_BROWSE_DEFAULT_KEY_1', 'dc:type');
|
||||||
|
define('UI_BROWSE_DEFAULT_KEY_2', 'dc:creator');
|
||||||
|
define('UI_BROWSE_DEFAULT_KEY_3', 'dc:source');
|
||||||
|
define('UI_BROWSE_DEFAULT_LIMIT', 10);
|
||||||
|
|
||||||
## Scheduler / Calendar
|
## Scheduler / Calendar
|
||||||
define('UI_SCHEDULER_FIRSTWEEKDAY', 1);
|
define('UI_SCHEDULER_FIRSTWEEKDAY', 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## LS stuff
|
||||||
require_once dirname(__FILE__).'/../../storageServer/var/conf.php';
|
require_once dirname(__FILE__).'/../../storageServer/var/conf.php';
|
||||||
## LS classes/functions #############################################
|
|
||||||
require_once dirname(__FILE__).'/ui_base.inc.php';
|
require_once dirname(__FILE__).'/ui_base.inc.php';
|
||||||
require_once dirname(__FILE__).'/ui_scratchpad.class.php';
|
require_once dirname(__FILE__).'/ui_scratchpad.class.php';
|
||||||
require_once dirname(__FILE__).'/ui_playlist.class.php';
|
require_once dirname(__FILE__).'/ui_playlist.class.php';
|
||||||
|
@ -70,7 +86,7 @@ require_once dirname(__FILE__).'/formmask/generic.inc.php';
|
||||||
require_once dirname(__FILE__).'/ui_calendar.class.php';
|
require_once dirname(__FILE__).'/ui_calendar.class.php';
|
||||||
require_once dirname(__FILE__).'/ui_scheduler.class.php';
|
require_once dirname(__FILE__).'/ui_scheduler.class.php';
|
||||||
|
|
||||||
## well known classes ###############################################
|
## well known classes
|
||||||
require_once 'DB.php';
|
require_once 'DB.php';
|
||||||
require_once 'HTML/QuickForm.php';
|
require_once 'HTML/QuickForm.php';
|
||||||
|
|
||||||
|
|
|
@ -530,13 +530,13 @@ class uiHandler extends uiBase {
|
||||||
*/
|
*/
|
||||||
function addPerm($subj, $permAction, $id, $allowDeny)
|
function addPerm($subj, $permAction, $id, $allowDeny)
|
||||||
{
|
{
|
||||||
if($this->gb->checkPerm($this->userid, 'editPerms', $id)){
|
#if($this->gb->checkPerm($this->userid, 'editPerms', $id)){
|
||||||
$this->gb->addPerm($subj, $permAction,
|
if (PEAR::isError($this->gb->addPerm($subj, $permAction, $id, $allowDeny))) {
|
||||||
$id, $allowDeny);
|
|
||||||
}else{
|
|
||||||
$this->_retMsg('Access denied.');
|
$this->_retMsg('Access denied.');
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
$this->redirUrl = UI_BROWSER.'?act=permissions&id='.$id;
|
$this->redirUrl = UI_BROWSER.'?act=permissions&id='.$id;
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -549,10 +549,13 @@ class uiHandler extends uiBase {
|
||||||
*/
|
*/
|
||||||
function removePerm($permid, $oid)
|
function removePerm($permid, $oid)
|
||||||
{
|
{
|
||||||
if($this->gb->checkPerm($this->userid, 'editPerms', $oid))
|
#if($this->gb->checkPerm($this->userid, 'editPerms', $oid))
|
||||||
$this->gb->removePerm($permid);
|
if (PEAR::isError($this->gb->removePerm($permid))) {
|
||||||
else $this->_retMsg('Access denied.');
|
$this->_retMsg('Access denied.');
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
$this->redirUrl = UI_BROWSER.'?act=permissions&id='.$oid;
|
$this->redirUrl = UI_BROWSER.'?act=permissions&id='.$oid;
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,8 @@ class uiPlaylist
|
||||||
}
|
}
|
||||||
$token = $this->Base->gb->lockPlaylistForEdit($plid, $this->Base->sessid);
|
$token = $this->Base->gb->lockPlaylistForEdit($plid, $this->Base->sessid);
|
||||||
if (PEAR::isError($token)) {
|
if (PEAR::isError($token)) {
|
||||||
#print_r($this->token);
|
#print_r($token);
|
||||||
$this->Base->_retMsg('Unable to activate playlist "$1"'. $this->Base->_getMDataValue($plid, UI_MDATA_KEY_TITLE));
|
$this->Base->_retMsg('Unable to activate playlist "$1"', $this->Base->_getMDataValue($plid, UI_MDATA_KEY_TITLE));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
$this->token = $token;
|
$this->token = $token;
|
||||||
|
@ -452,6 +452,14 @@ class uiPlaylist
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function isAvailable($id)
|
||||||
|
{
|
||||||
|
if (strtolower($this->Base->gb->getFileType($id))==="playlist" && $this->Base->gb->playlistIsAvailable($id, $this->Base->sessid) === TRUE)
|
||||||
|
return TRUE;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function _plTimeToSecs($plt, $length=4)
|
function _plTimeToSecs($plt, $length=4)
|
||||||
{
|
{
|
||||||
$arr = split(':', $plt);
|
$arr = split(':', $plt);
|
||||||
|
|
|
@ -3,7 +3,9 @@ class uiScheduler extends uiCalendar
|
||||||
{
|
{
|
||||||
function uiScheduler(&$uiBase)
|
function uiScheduler(&$uiBase)
|
||||||
{
|
{
|
||||||
$this->curr =& $_SESSION[UI_CALENDAR_SESSNAME]['current'];
|
$this->curr =& $_SESSION[UI_CALENDAR_SESSNAME]['current'];
|
||||||
|
$this->scheduleAt =& $_SESSION[UI_CALENDAR_SESSNAME]['schedule'];
|
||||||
|
|
||||||
if (!is_array($this->curr)) {
|
if (!is_array($this->curr)) {
|
||||||
$this->curr['view'] = 'month';
|
$this->curr['view'] = 'month';
|
||||||
$this->curr['year'] = strftime("%Y");
|
$this->curr['year'] = strftime("%Y");
|
||||||
|
@ -18,6 +20,7 @@ class uiScheduler extends uiCalendar
|
||||||
|
|
||||||
$this->Base =& $uiBase;
|
$this->Base =& $uiBase;
|
||||||
$this->reloadUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
|
$this->reloadUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
|
||||||
|
$this->closeUrl = UI_BROWSER.'?popup[]=_close';
|
||||||
|
|
||||||
$this->uiCalendar();
|
$this->uiCalendar();
|
||||||
$this->initXmlRpc();
|
$this->initXmlRpc();
|
||||||
|
@ -29,6 +32,13 @@ class uiScheduler extends uiCalendar
|
||||||
$this->Base->redirUrl = $this->reloadUrl;
|
$this->Base->redirUrl = $this->reloadUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function setClose()
|
||||||
|
{
|
||||||
|
$this->Base->redirUrl = $this->closeUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function set($arr)
|
function set($arr)
|
||||||
{
|
{
|
||||||
extract($arr);
|
extract($arr);
|
||||||
|
@ -43,17 +53,17 @@ class uiScheduler extends uiCalendar
|
||||||
$stampNow = $this->_datetime2timestamp($this->curr['year'].$this->curr['month'].$this->curr['day'].'T'.$this->curr['hour'].':00:00');
|
$stampNow = $this->_datetime2timestamp($this->curr['year'].$this->curr['month'].$this->curr['day'].'T'.$this->curr['hour'].':00:00');
|
||||||
$stampTarget = $stampNow;
|
$stampTarget = $stampNow;
|
||||||
|
|
||||||
if ($month=='++')
|
if ($month==='++')
|
||||||
$stampTarget = strtotime("+1 month", $stampNow);
|
$stampTarget = strtotime("+1 month", $stampNow);
|
||||||
if ($month=='--')
|
if ($month==='--')
|
||||||
$stampTarget = strtotime("-1 month", $stampNow);
|
$stampTarget = strtotime("-1 month", $stampNow);
|
||||||
if ($week=='++')
|
if ($week==='++')
|
||||||
$stampTarget = strtotime("+1 week", $stampNow);
|
$stampTarget = strtotime("+1 week", $stampNow);
|
||||||
if ($week=='--')
|
if ($week==='--')
|
||||||
$stampTarget = strtotime("-1 week", $stampNow);
|
$stampTarget = strtotime("-1 week", $stampNow);
|
||||||
if ($day=='++')
|
if ($day==='++')
|
||||||
$stampTarget = strtotime("+1 day", $stampNow);
|
$stampTarget = strtotime("+1 day", $stampNow);
|
||||||
if ($day=='--')
|
if ($day==='--')
|
||||||
$stampTarget = strtotime("-1 day", $stampNow);
|
$stampTarget = strtotime("-1 day", $stampNow);
|
||||||
|
|
||||||
if ($today)
|
if ($today)
|
||||||
|
@ -67,7 +77,7 @@ class uiScheduler extends uiCalendar
|
||||||
$this->curr['dayname'] = strftime("%A", $stampTarget);
|
$this->curr['dayname'] = strftime("%A", $stampTarget);
|
||||||
$this->curr['monthname']= strftime("%B", $stampTarget);
|
$this->curr['monthname']= strftime("%B", $stampTarget);
|
||||||
|
|
||||||
if ($this->curr['year'] == strftime("%Y") && $this->curr['month'] == strftime("%m") && $this->curr['day'] == strftime("%d"))
|
if ($this->curr['year'] === strftime("%Y") && $this->curr['month'] === strftime("%m") && $this->curr['day'] === strftime("%d"))
|
||||||
$this->curr['isToday'] = TRUE;
|
$this->curr['isToday'] = TRUE;
|
||||||
else
|
else
|
||||||
$this->curr['isToday'] = FALSE;
|
$this->curr['isToday'] = FALSE;
|
||||||
|
@ -75,6 +85,19 @@ class uiScheduler extends uiCalendar
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function setscheduleAt($arr)
|
||||||
|
{
|
||||||
|
extract($arr);
|
||||||
|
#print_r($arr);
|
||||||
|
|
||||||
|
if (is_numeric($year)) $this->scheduleAt['year'] = $year;
|
||||||
|
if (is_numeric($month)) $this->scheduleAt['month'] = sprintf('%02d', $month);
|
||||||
|
if (is_numeric($day)) $this->scheduleAt['day'] = sprintf('%02d', $day);
|
||||||
|
if (is_numeric($hour)) $this->scheduleAt['hour'] = sprintf('%02d', $hour);
|
||||||
|
if (is_numeric($minute)) $this->scheduleAt['minute'] = sprintf('%02d', $minute);
|
||||||
|
if (is_numeric($second)) $this->scheduleAt['second'] = sprintf('%02d', $second);
|
||||||
|
}
|
||||||
|
|
||||||
function getWeekEntrys()
|
function getWeekEntrys()
|
||||||
{
|
{
|
||||||
## build array within all entrys of current week ##
|
## build array within all entrys of current week ##
|
||||||
|
@ -242,15 +265,19 @@ class uiScheduler extends uiCalendar
|
||||||
function getScheduleForm()
|
function getScheduleForm()
|
||||||
{
|
{
|
||||||
global $ui_fmask;
|
global $ui_fmask;
|
||||||
foreach ($this->playlists as $val)
|
|
||||||
|
foreach ($this->availablePlaylists as $val)
|
||||||
$ui_fmask['schedule']['playlist']['options'][$val['gunid']] = $val['title'];
|
$ui_fmask['schedule']['playlist']['options'][$val['gunid']] = $val['title'];
|
||||||
#print_r($ui_fmask);
|
#print_r($ui_fmask);
|
||||||
$form = new HTML_QuickForm('schedule', UI_STANDARD_FORM_METHOD, UI_HANDLER);
|
$form = new HTML_QuickForm('schedule', UI_STANDARD_FORM_METHOD, UI_HANDLER);
|
||||||
$this->Base->_parseArr2Form($form, $ui_fmask['schedule']);
|
$this->Base->_parseArr2Form($form, $ui_fmask['schedule']);
|
||||||
$settime = array('H' => $this->curr['hour']);
|
$settime = array('H' => $this->scheduleAt['hour'],
|
||||||
$setdate = array('Y' => $this->curr['year'],
|
'i' => $this->scheduleAt['minute'],
|
||||||
'm' => $this->curr['month'],
|
's' => $this->scheduleAt['second']
|
||||||
'd' => $this->curr['day']);
|
);
|
||||||
|
$setdate = array('Y' => $this->scheduleAt['year'],
|
||||||
|
'm' => $this->scheduleAt['month'],
|
||||||
|
'd' => $this->scheduleAt['day']);
|
||||||
$form->setDefaults(array('time' => $settime,
|
$form->setDefaults(array('time' => $settime,
|
||||||
'date' => $setdate,
|
'date' => $setdate,
|
||||||
'playlist' => $setplaylist));
|
'playlist' => $setplaylist));
|
||||||
|
@ -263,6 +290,19 @@ class uiScheduler extends uiCalendar
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function copyPlFromSP()
|
||||||
|
{
|
||||||
|
foreach ($this->Base->SCRATCHPAD->get() as $val) {
|
||||||
|
if ($val['type'] === 'playlist' && $this->Base->gb->playlistIsAvailable($val['id'], $this->Base->sessid) === TRUE && $val['id'] != $this->Base->PLAYLIST->activeId)
|
||||||
|
$this->availablePlaylists[] = $val;
|
||||||
|
}
|
||||||
|
if (!count($this->availablePlaylists))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function getNowNextClip($distance=0)
|
function getNowNextClip($distance=0)
|
||||||
{
|
{
|
||||||
$datetime = strftime('%Y-%m-%dT%H:%M:%S');
|
$datetime = strftime('%Y-%m-%dT%H:%M:%S');
|
||||||
|
@ -286,18 +326,6 @@ class uiScheduler extends uiCalendar
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function _copyPlFromSP()
|
|
||||||
{
|
|
||||||
foreach ($this->Base->SCRATCHPAD->get() as $val) {
|
|
||||||
if (strtolower($val['type'])=='playlist' && $val['id']!=$this->Base->PLAYLIST->activeId)
|
|
||||||
$this->playlists[] = $val;
|
|
||||||
}
|
|
||||||
if (!count($this->playlists))
|
|
||||||
return FALSE;
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function _datetime2timestamp($i)
|
function _datetime2timestamp($i)
|
||||||
{
|
{
|
||||||
$i = str_replace('T', ' ', $i);
|
$i = str_replace('T', ' ', $i);
|
||||||
|
@ -321,11 +349,11 @@ class uiScheduler extends uiCalendar
|
||||||
|
|
||||||
function _scheduledDays($period)
|
function _scheduledDays($period)
|
||||||
{
|
{
|
||||||
if ($period=='month') {
|
if ($period==='month') {
|
||||||
require_once 'Calendar/Month/Weekdays.php';
|
require_once 'Calendar/Month/Weekdays.php';
|
||||||
$Period = new Calendar_Month_Weekdays($this->curr['year'], $this->curr['month'], $this->firstDayOfWeek);
|
$Period = new Calendar_Month_Weekdays($this->curr['year'], $this->curr['month'], $this->firstDayOfWeek);
|
||||||
$Period->build();
|
$Period->build();
|
||||||
} elseif ($period=='week') {
|
} elseif ($period==='week') {
|
||||||
require_once 'Calendar/Week.php';
|
require_once 'Calendar/Week.php';
|
||||||
$Period = new Calendar_Week ($this->curr['year'], $this->curr['month'], $this->curr['day'], $this->firstDayOfWeek);
|
$Period = new Calendar_Week ($this->curr['year'], $this->curr['month'], $this->curr['day'], $this->firstDayOfWeek);
|
||||||
$Period->build();
|
$Period->build();
|
||||||
|
|
|
@ -76,7 +76,7 @@ class uiScratchPad
|
||||||
}
|
}
|
||||||
if (!is_array($ids))
|
if (!is_array($ids))
|
||||||
$ids = array($ids);
|
$ids = array($ids);
|
||||||
|
|
||||||
$sp = $this->get();
|
$sp = $this->get();
|
||||||
foreach ($ids as $id) {
|
foreach ($ids as $id) {
|
||||||
$item = $this->Base->_getMetaInfo($id);
|
$item = $this->Base->_getMetaInfo($id);
|
||||||
|
|
|
@ -125,7 +125,7 @@ class uiSearch
|
||||||
$this->criteria['counter'] = UI_SIMPLESEARCH_ROWS;
|
$this->criteria['counter'] = UI_SIMPLESEARCH_ROWS;
|
||||||
$this->criteria['form']['operator'] = 'OR'; ## $criteria['form'] is used for retransfer to form ##
|
$this->criteria['form']['operator'] = 'OR'; ## $criteria['form'] is used for retransfer to form ##
|
||||||
$this->criteria['form']['filetype'] = 'File';
|
$this->criteria['form']['filetype'] = 'File';
|
||||||
$this->criteria['form']['limit'] = 5;
|
$this->criteria['form']['limit'] = UI_SIMPLESEARCH_LIMIT;
|
||||||
|
|
||||||
for ($n = 1; $n<=UI_SIMPLESEARCH_ROWS; $n++) {
|
for ($n = 1; $n<=UI_SIMPLESEARCH_ROWS; $n++) {
|
||||||
$this->criteria['conditions'][$n] = array('cat' => constant('UI_SIMPLESEARCH_CAT'.$n),
|
$this->criteria['conditions'][$n] = array('cat' => constant('UI_SIMPLESEARCH_CAT'.$n),
|
||||||
|
@ -146,8 +146,8 @@ class uiSearch
|
||||||
{
|
{
|
||||||
if (count($this->criteria) === 0)
|
if (count($this->criteria) === 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
$this->results = array('page' => $this->criteria['offset']/$this->criteria['limit']);
|
$this->results = array('page' => $this->criteria['offset'] / $this->criteria['limit']);
|
||||||
|
|
||||||
#print_r($this->criteria);
|
#print_r($this->criteria);
|
||||||
$results = $this->Base->gb->localSearch($this->criteria, $this->Base->sessid);
|
$results = $this->Base->gb->localSearch($this->criteria, $this->Base->sessid);
|
||||||
|
@ -167,7 +167,7 @@ class uiSearch
|
||||||
(
|
(
|
||||||
'id' => 24,
|
'id' => 24,
|
||||||
'gunid' => '1cc472228d0cb2ac',
|
'gunid' => '1cc472228d0cb2ac',
|
||||||
'title' => 'Strom 10min',
|
'title' => 'Item '.$n,
|
||||||
'creator' => 'Sebastian',
|
'creator' => 'Sebastian',
|
||||||
'duration' => ' 10:00',
|
'duration' => ' 10:00',
|
||||||
'type' => 'webstream'
|
'type' => 'webstream'
|
||||||
|
@ -185,28 +185,34 @@ class uiSearch
|
||||||
|
|
||||||
function pagination(&$results)
|
function pagination(&$results)
|
||||||
{
|
{
|
||||||
if (sizeof($this->results) == 0) {
|
if (sizeof($this->results['items']) == 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pot = 0; # potence
|
$currp = ($this->criteria['offset'] / $this->criteria['limit']) + 1; # current page
|
||||||
$lpr = 10; # links pro range
|
$maxp = ceil($results['cnt'] / $this->criteria['limit']); # maximum page
|
||||||
$width = 1; # width bettween pages
|
|
||||||
$currp = ($this->criteria['offset']/$this->criteria['limit']) +1 ; # current page
|
|
||||||
$maxp = ceil($results['cnt']/$this->criteria['limit']); # maximum page
|
|
||||||
|
|
||||||
|
/*
|
||||||
for ($n = 1; $n <= $maxp; $n = $n+$width) {
|
for ($n = 1; $n <= $maxp; $n = $n+$width) {
|
||||||
if ($n<$currp)
|
$width = pow(10, floor(($n)/10));
|
||||||
$width = pow($lpr, floor(log10(abs($n-$currp))));
|
|
||||||
else
|
|
||||||
$width = pow($lpr, floor(log10(abs($n-$currp)+1)));
|
|
||||||
$this->results['pagination'][$n] = $n;
|
$this->results['pagination'][$n] = $n;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
$deltaLower = UI_SEARCHRESULTS_DELTA;
|
||||||
|
$deltaUpper = UI_SEARCHRESULTS_DELTA;
|
||||||
|
$start = $currp;
|
||||||
|
|
||||||
|
if ($start+$delta-$maxp > 0) $deltaLower += $start+$delta-$maxp; ## correct lower boarder if page is near end
|
||||||
|
|
||||||
|
for ($n = $start-$deltaLower; $n <= $start+$deltaUpper; $n++) {
|
||||||
|
if ($n <= 0) $deltaUpper++; ## correct upper boarder if page is near zero
|
||||||
|
elseif ($n <= $maxp) $this->results['pagination'][$n] = $n;
|
||||||
}
|
}
|
||||||
|
|
||||||
#array_pop($this->results['pagination']);
|
#array_pop($this->results['pagination']);
|
||||||
$this->results['pagination'][$maxp] = '>>|';
|
$this->results['pagination'][1] ? NULL : $this->results['pagination'][1] = '|<<';
|
||||||
$this->results['pagination'][1] = '|<<';
|
$this->results['pagination'][$maxp] ? NULL : $this->results['pagination'][$maxp] = '>>|';
|
||||||
$this->results['next'] = $results['cnt'] > $this->criteria['offset'] + $this->criteria['limit'] ? TRUE : FALSE;
|
$this->results['next'] = $results['cnt'] > $this->criteria['offset'] + $this->criteria['limit'] ? TRUE : FALSE;
|
||||||
$this->results['prev'] = $this->criteria['offset'] > 0 ? TRUE : FALSE;
|
$this->results['prev'] = $this->criteria['offset'] > 0 ? TRUE : FALSE;
|
||||||
ksort($this->results['pagination']);
|
ksort($this->results['pagination']);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue