*** empty log message ***

This commit is contained in:
sebastian 2005-03-11 22:48:09 +00:00
parent b418a85f8d
commit 96e5fd0f1a
3 changed files with 48 additions and 31 deletions

View file

@ -1,6 +1,8 @@
{$SCHEDULER->buildWeek()}
{assign var="_divisor" value=180}
{assign var="_minwidth" value=20}
<table border=1>
<table border="1">
<tr>
<td rowspan="2"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=--')"><<</a> </td>
@ -14,24 +16,31 @@
{foreach from=$SCHEDULER->Week item="_Day"}
<td valign="top">
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day&day={$_Day.day}&month={$_Day.month}&year={$_Day.year}')"><b>{$_Day.day}</b></a>
{if $_Day.isSelected}
{assign var="_oneday" value=$SCHEDULER->getDayTiming($_Day.year, $_Day.month, $_Day.day)}
<table border="1" style="font-family : monospace">
<table border="0" cellspacing="0" cellpadding="0">
{foreach from=$_oneday item="i"}
<tr height="{$i.length/360}">
<td><small>
<tr height="{$SCHEDULER->_oneOrMore($i.length/$_divisor)}" style="font-family: monospace" valign="top">
{if is_array($i.entry)}
<td bgcolor="pink" width="80" height="{$SCHEDULER->_oneOrMore($i.length/$_divisor)}">
{if $i.length/$_divisor > $_minwidth}
<small>
Start:{$i.entry.start|regex_replace:"/[0-9]+T/":""}
<br>
End:&nbsp;&nbsp;{$i.entry.end|regex_replace:"/[0-9]+T/":""}
{else}
Gap
</small>
{/if}
</td>
{else}
<td bgcolor="lightblue" width="80" height="{$SCHEDULER->_oneOrMore($i.length/$_divisor)}">
</td>
{/if}
</small></td>
</tr>
{/foreach}
</table>
{/if}
</td>
{/foreach}
</tr>

View file

@ -266,12 +266,13 @@ class uiHandler extends uiBase {
}
}
$data = $this->_dateArr2Str($mData);
foreach ($data as $key=>$val) { echo "\n".$key.": ".$val."\n";
foreach ($data as $key=>$val) {
$r = $this->gb->setMDataValue($id, $key, $this->sessid, $val);
print_r($r);
if (PEAR::isError($r)) {
$this->_retMsg('Unable to set $1: $2', $key, $val);
}
}
$this->_retMsg('Metadata saved');
$type = $this->gb->getFileType($id)=='webstream' ? 'Webstream' : 'File';
$this->redirUrl = UI_BROWSER."?act=editItem&id=$id";
}

View file

@ -84,44 +84,46 @@ class uiScheduler extends uiCalendar
function getDayTiming($year, $month, $day)
{
if (!$arr = $this->getDayUsage($year, $month, $day))
return false;
## !! bug in strtotime. zeigt 8h später an als reines datum, wenn Txx:xx:xx verwendet wird !!
$day_start = $this->_datetime2timestamp($year.$month.$day.'T00:00:00');
$day_end = $this->_datetime2timestamp($year.$month.$day.'T23:59:59');
if (!$arr = $this->getDayUsage($year, $month, $day))
return array(array( ## empty day
'type' => 'gap',
'length' => $day_end - $day_start
));
$curr = current($arr);
if (strtotime($curr['start']) > $day_start) ## insert gap if first entry start after 00:00:00
$list[] = array(
'type' => 'firstgap',
'pos' => 0,
'length' => strtotime($curr['start']) - $day_start -1
'type' => 'gap',
#'pos' => 0,
'length' => strtotime($curr['start']) - $day_start
);
while ($curr = current($arr)) {
$list[] = array(
'type' => 'entry',
'pos' => strtotime($curr['start']) - $day_start,
#'pos' => strtotime($curr['start']) - $day_start,
'length' => strtotime($curr['end']) - strtotime($curr['start']),
'entry' => $curr
);
if ($next = next($arr)) {
if ($next['start'] > $curr['end']+1) ## insert gap between entrys
if (strtotime($next['start']) > strtotime($curr['end'])+1) ## insert gap between entrys
$list[] = array(
'type' => 'gap',
'pos' => strtotime($curr['start'])-$day_start,
'length' => strtotime($next['start']) - strtotime($curr['end']) -1,
#'pos' => strtotime($curr['start'])-$day_start,
'length' => strtotime($next['start']) - strtotime($curr['end']),
);
}
else {
if (strtotime($curr['end']) < $day_end) ## insert gap if prev entry was not until midnight
$list[] = array(
'type' => 'lastgap',
'pos' => strtotime($curr['end']) - $day_start,
'length' => $day_end-strtotime($curr['end']),
'type' => 'gap',
#'pos' => strtotime($curr['end']) - $day_start,
'length' => $day_end - strtotime($curr['end']),
);
}
@ -131,6 +133,11 @@ class uiScheduler extends uiCalendar
}
function _oneOrMore($in)
{
return $id < 1 ? ceil($in) : round($in);
}
function _scheduledDays($period)
{
if ($period=='month') {