This commit is contained in:
sebastian 2005-09-08 11:31:32 +00:00
parent cf5e769ee4
commit 28b580edec
8 changed files with 66 additions and 44 deletions

View File

@ -89,7 +89,7 @@ $ui_fmask = array(
'element' => 'stationMaxfilesize', 'element' => 'stationMaxfilesize',
'isPref' => TRUE, 'isPref' => TRUE,
'type' => 'text', 'type' => 'text',
'label' => 'Reduce Upload Filesize', 'label' => 'Limit upload filesize',
'rule' => 'numeric', 'rule' => 'numeric',
'attributes' => array( 'attributes' => array(
'onClick' => 'alert ("'.tra('Note: System Maximum is set to $1 in php.ini. You can just reduce this amount here.', 'onClick' => 'alert ("'.tra('Note: System Maximum is set to $1 in php.ini. You can just reduce this amount here.',

View File

@ -57,7 +57,7 @@ if (window.attachEvent) window.attachEvent("onload", sfHover);
<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>
<li><a href="javascript: hpopup('{$UI_HANDLER}?act=SCHEDULER.startDaemon')">##Start Scheduler##</a></li> {* <li><a href="javascript: hpopup('{$UI_HANDLER}?act=SCHEDULER.startDaemon')">##Start Scheduler##</a></li> *}
</ul> </ul>
</li> </li>
{/if} {/if}

View File

@ -12,21 +12,8 @@
<form name="SCHEDULER"> <form name="SCHEDULER">
<table class="scheduler_day" style="width: 606px;"> <table class="scheduler_day" style="width: 606px;">
{* Tag vor/zurück + code um heutigen Tag abzufragen
<tr>
<th><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&day=--')"><<</a></th>
<th colspan="3" {if $SCHEDULER->curr.isToday} bgcolor="grey"{/if}>##{$SCHEDULER->curr.dayname}##, ##{$SCHEDULER->curr.year}##-##{$SCHEDULER->curr.month}##-##{$SCHEDULER->curr.day}##</th>
<th><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&day=%2B%2B')">>></a></th>
</tr>
*}
<tr class="blue_head"> <tr class="blue_head">
{*
Multi-action checkboxen, die brauchen wir aber höchstens bei den Einträgen um mehere auf einmal zu löschen ?
<td style="width: 30px"><input type="checkbox" name="all" onClick="collector_switchAll('SCHEDULER')"></td>
*}
<td style="border-left: 1px solid #ccc; width: 95px">##Time##</td> <td style="border-left: 1px solid #ccc; width: 95px">##Time##</td>
<td style="width: 481px; border-right: 0;">##Show Info##</td> <td style="width: 481px; border-right: 0;">##Show Info##</td>
</tr> </tr>
@ -35,20 +22,32 @@
{if is_array($_entrys[$_hour])} {if is_array($_entrys[$_hour])}
<tr class="blue1"> <tr class="blue1">
<td style="border-left: 1px solid #ccc; cursor: pointer" {include file="scheduler/day_additem.tpl"}>{$_hour|string_format:"%02d"}:00</td> <td style="border-left: 1px solid #ccc; cursor: pointer" {include file="scheduler/day_additem.tpl"}>
{$_hour|string_format:"%02d"}:00
</td>
<td style="border-right: 1px solid #ccc;"> <td style="border-right: 1px solid #ccc;">
{if $_entrys[$_hour].end}
{include file="scheduler/between_additem.tpl"}
{/if}
{foreach from=$_entrys[$_hour] item="i"} {* hier werden die Einträge welche in der jeweil. h beginnen durchlaufen *} {if $_entrys[$_hour].start}
{foreach from=$_entrys[$_hour].start item="i"}
<div {include file="scheduler/removeitem.tpl"}> <div {include file="scheduler/removeitem.tpl"}>
<img src="img/playlist.png" border="0" {include file="sub/alttext.tpl"}> <img src="img/playlist.png" border="0" {include file="sub/alttext.tpl"}>
&nbsp; &nbsp;
<b>{$i.title}</b> <b>{$i.title}</b>
{$i.start}-{$i.end} {$i.start}-{$i.end}
{$i.creator} {$i.creator}
</div> {if $i.endshere}
{include file="scheduler/between_additem.tpl"} {include file="scheduler/between_additem.tpl"}
{/if}
</div>
{/foreach} {/foreach}
{/if}
{if $_entrys.span[$_hour]}
span
{/if}
</td> </td>
</tr> </tr>
{else} {else}
@ -58,6 +57,7 @@
</tr> </tr>
{/if} {/if}
{/foreach} {/foreach}
</table> </table>
</form> </form>

View File

@ -152,6 +152,7 @@ class uiBase
function loadStationPrefs(&$mask, $reload=FALSE) function loadStationPrefs(&$mask, $reload=FALSE)
{ {
if (!is_array($this->STATIONPREFS) || $reload===TRUE) { if (!is_array($this->STATIONPREFS) || $reload===TRUE) {
$this->STATIONPREFS = array();
foreach ($mask as $key=>$val) { foreach ($mask as $key=>$val) {
if ($val['isPref']) { if ($val['isPref']) {
if (is_string($setting = $this->gb->loadGroupPref(NULL, 'StationPrefs', $val['element']))) { if (is_string($setting = $this->gb->loadGroupPref(NULL, 'StationPrefs', $val['element']))) {
@ -161,8 +162,8 @@ class uiBase
} }
} }
} }
if (!$this->STATIONPREFS['stationMaxfilesize'])
$this->STATIONPREFS['stationMaxfilesize'] = strtr(ini_get('upload_max_filesize'), array('M'=>'000000', 'k'=>'000')); #if ($this->STATIONPREFS['stationMaxfilesize']) $this->STATIONPREFS['stationMaxfilesize'] = strtr(ini_get('upload_max_filesize'), array('M'=>'000000', 'k'=>'000'));
if ($miss && $this->gb->getSessLogin($this->sessid)) { if ($miss && $this->gb->getSessLogin($this->sessid)) {
if (UI_WARNING) $this->_retMsg('Note: Station Preferences not setup proberly.'); if (UI_WARNING) $this->_retMsg('Note: Station Preferences not setup proberly.');

View File

@ -152,7 +152,8 @@ class uiBrowser extends uiBase {
$mask =& $GLOBALS['ui_fmask']['file']; $mask =& $GLOBALS['ui_fmask']['file'];
$form = new HTML_QuickForm('uploadFile', UI_STANDARD_FORM_METHOD, UI_HANDLER); $form = new HTML_QuickForm('uploadFile', UI_STANDARD_FORM_METHOD, UI_HANDLER);
$form->setMaxFileSize($this->STATIONPREFS['stationMaxfilesize']); if (!$this->STATIONPREFS['stationMaxfilesize']) $form->setMaxFileSize(strtr(ini_get('upload_max_filesize'), array('M'=>'000000', 'k'=>'000')));
else $form->setMaxFileSize($this->STATIONPREFS['stationMaxfilesize']);
$form->setConstants(array('folderId' => $folderId, $form->setConstants(array('folderId' => $folderId,
'id' => $id, 'id' => $id,
'act' => $id ? 'editItem' : 'addFileData')); 'act' => $id ? 'editItem' : 'addFileData'));

View File

@ -88,7 +88,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_DEFAULT_VIEW', 'day');
define('UI_SCHEDULER_PAUSE_PL2PL', '5 seconds'); define('UI_SCHEDULER_PAUSE_PL2PL', '0 seconds');
## File types ## File types
define('UI_FILETYPE_ANY', 'file'); define('UI_FILETYPE_ANY', 'file');

View File

@ -227,16 +227,36 @@ class uiScheduler extends uiCalendar
return FALSE; return FALSE;
foreach ($arr as $key => $val) { foreach ($arr as $key => $val) {
$items[number_format(strftime('%H', $this->_datetime2timestamp($val['start'])))][]= array ( $start = $this->_datetime2timestamp($val['start']);
$end = $this->_datetime2timestamp($val['end']);
$Y = strftime('%Y', $start);
$m = number_format(strftime('%m', $start));
$d = number_format(strftime('%d', $start));
$h = number_format(strftime('%H', $start));
$M = number_format(strftime('%i', $start));
## item starts today -> put metadata to array
if (strftime('%Y%m%d', $start) === $thisDay) {
$items[number_format(strftime('%H', $start))]['start'][] = array(
'id' => $this->Base->gb->_idFromGunid($val['playlistId']), 'id' => $this->Base->gb->_idFromGunid($val['playlistId']),
'scheduleid'=> $val['id'], 'scheduleid'=> $val['id'],
'start' => substr($val['start'], strpos($val['start'], 'T')+1), 'start' => substr($val['start'], strpos($val['start'], 'T')+1),
'end' => substr($val['end'], strpos($val['end'], 'T') + 1), 'end' => substr($val['end'], strpos($val['end'], 'T') + 1),
'title' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_TITLE), 'title' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_TITLE),
'creator' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_CREATOR), 'creator' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_CREATOR),
'type' => 'Playlist' 'type' => 'Playlist',
'endshere' => strftime('%H', $start) === strftime('%H', $end) ? TRUE : FALSE
); );
} }
/* mark the span as in use
for ($n = number_format(strftime('%H', $start))+1; $n <= number_format(strftime('%H', $end)); $n++) {
$items['span'][$n] = TRUE;
} */
## item which end today
if (strftime('%Y%m%d', $end) === $thisDay && strftime('%H', $start) !== strftime('%H', $end)) {
$items[number_format(strftime('%H', $end))]['end'] = TRUE;
}
}
#print_r($items); #print_r($items);
return $items; return $items;
@ -296,7 +316,7 @@ class uiScheduler extends uiCalendar
for ($n = 0; $n <= 23; $n++) { for ($n = 0; $n <= 23; $n++) {
$scale[] = $n; $scale[] = $n;
} }
#print_r($scale);
return $scale; return $scale;
} }