parent
cf5e769ee4
commit
28b580edec
|
@ -89,7 +89,7 @@ $ui_fmask = array(
|
|||
'element' => 'stationMaxfilesize',
|
||||
'isPref' => TRUE,
|
||||
'type' => 'text',
|
||||
'label' => 'Reduce Upload Filesize',
|
||||
'label' => 'Limit upload filesize',
|
||||
'rule' => 'numeric',
|
||||
'attributes' => array(
|
||||
'onClick' => 'alert ("'.tra('Note: System Maximum is set to $1 in php.ini. You can just reduce this amount here.',
|
||||
|
|
|
@ -434,7 +434,7 @@ class Data {
|
|||
}
|
||||
|
||||
function langId2Name($id, $type='xml')
|
||||
{
|
||||
{
|
||||
|
||||
if ($arr = Data::readXML2Arr('./languages.xml')) {
|
||||
$languages = $arr[language];
|
||||
|
|
|
@ -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=SUBJECTS" >##User/Groups##</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>
|
||||
</li>
|
||||
{/if}
|
||||
|
|
|
@ -12,21 +12,8 @@
|
|||
<form name="SCHEDULER">
|
||||
<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">
|
||||
|
||||
{*
|
||||
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="width: 481px; border-right: 0;">##Show Info##</td>
|
||||
</tr>
|
||||
|
@ -35,21 +22,33 @@
|
|||
|
||||
{if is_array($_entrys[$_hour])}
|
||||
<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-right: 1px solid #ccc;">
|
||||
<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;">
|
||||
{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 *}
|
||||
<div {include file="scheduler/removeitem.tpl"}>
|
||||
<img src="img/playlist.png" border="0" {include file="sub/alttext.tpl"}>
|
||||
|
||||
<b>{$i.title}</b>
|
||||
{$i.start}-{$i.end}
|
||||
{$i.creator}
|
||||
</div>
|
||||
{include file="scheduler/between_additem.tpl"}
|
||||
{/foreach}
|
||||
{if $_entrys[$_hour].start}
|
||||
{foreach from=$_entrys[$_hour].start item="i"}
|
||||
<div {include file="scheduler/removeitem.tpl"}>
|
||||
<img src="img/playlist.png" border="0" {include file="sub/alttext.tpl"}>
|
||||
|
||||
<b>{$i.title}</b>
|
||||
{$i.start}-{$i.end}
|
||||
{$i.creator}
|
||||
{if $i.endshere}
|
||||
{include file="scheduler/between_additem.tpl"}
|
||||
{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
</td>
|
||||
{if $_entrys.span[$_hour]}
|
||||
span
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{else}
|
||||
<tr class="blue2" {include file="scheduler/day_additem.tpl"}>
|
||||
|
@ -58,6 +57,7 @@
|
|||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
</table>
|
||||
</form>
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ class uiBase
|
|||
|
||||
function uiBase(&$config)
|
||||
{
|
||||
$this->dbc = DB::connect($config['dsn'], TRUE);
|
||||
$this->dbc = DB::connect($config['dsn'], TRUE);
|
||||
if (DB::isError($this->dbc)) {
|
||||
die($this->dbc->getMessage());
|
||||
}
|
||||
|
@ -152,6 +152,7 @@ class uiBase
|
|||
function loadStationPrefs(&$mask, $reload=FALSE)
|
||||
{
|
||||
if (!is_array($this->STATIONPREFS) || $reload===TRUE) {
|
||||
$this->STATIONPREFS = array();
|
||||
foreach ($mask as $key=>$val) {
|
||||
if ($val['isPref']) {
|
||||
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 (UI_WARNING) $this->_retMsg('Note: Station Preferences not setup proberly.');
|
||||
|
|
|
@ -152,7 +152,8 @@ class uiBrowser extends uiBase {
|
|||
$mask =& $GLOBALS['ui_fmask']['file'];
|
||||
|
||||
$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,
|
||||
'id' => $id,
|
||||
'act' => $id ? 'editItem' : 'addFileData'));
|
||||
|
|
|
@ -88,7 +88,7 @@ define('UI_BROWSE_DEFAULT_LIMIT', 10);
|
|||
## Scheduler / Calendar
|
||||
define('UI_SCHEDULER_FIRSTWEEKDAY', 1);
|
||||
define('UI_SCHEDULER_DEFAULT_VIEW', 'day');
|
||||
define('UI_SCHEDULER_PAUSE_PL2PL', '5 seconds');
|
||||
define('UI_SCHEDULER_PAUSE_PL2PL', '0 seconds');
|
||||
|
||||
## File types
|
||||
define('UI_FILETYPE_ANY', 'file');
|
||||
|
|
|
@ -227,15 +227,35 @@ class uiScheduler extends uiCalendar
|
|||
return FALSE;
|
||||
|
||||
foreach ($arr as $key => $val) {
|
||||
$items[number_format(strftime('%H', $this->_datetime2timestamp($val['start'])))][]= array (
|
||||
'id' => $this->Base->gb->_idFromGunid($val['playlistId']),
|
||||
'scheduleid'=> $val['id'],
|
||||
'start' => substr($val['start'], strpos($val['start'], '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),
|
||||
'creator' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_CREATOR),
|
||||
'type' => 'Playlist'
|
||||
);
|
||||
$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']),
|
||||
'scheduleid'=> $val['id'],
|
||||
'start' => substr($val['start'], strpos($val['start'], '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),
|
||||
'creator' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_CREATOR),
|
||||
'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);
|
||||
|
@ -296,7 +316,7 @@ class uiScheduler extends uiCalendar
|
|||
for ($n = 0; $n <= 23; $n++) {
|
||||
$scale[] = $n;
|
||||
}
|
||||
#print_r($scale);
|
||||
|
||||
return $scale;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue