*** 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()} {$SCHEDULER->buildWeek()}
{assign var="_divisor" value=180}
{assign var="_minwidth" value=20}
<table border=1> <table border="1">
<tr> <tr>
<td rowspan="2"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=--')"><<</a> </td> <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"} {foreach from=$SCHEDULER->Week item="_Day"}
<td valign="top"> <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> <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)} {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"} {foreach from=$_oneday item="i"}
<tr height="{$i.length/360}"> <tr height="{$SCHEDULER->_oneOrMore($i.length/$_divisor)}" style="font-family: monospace" valign="top">
<td><small> {if is_array($i.entry)}
{if is_array($i.entry)} <td bgcolor="pink" width="80" height="{$SCHEDULER->_oneOrMore($i.length/$_divisor)}">
Start:{$i.entry.start|regex_replace:"/[0-9]+T/":""} {if $i.length/$_divisor > $_minwidth}
<br> <small>
End:&nbsp;&nbsp;{$i.entry.end|regex_replace:"/[0-9]+T/":""} Start:{$i.entry.start|regex_replace:"/[0-9]+T/":""}
{else} <br>
Gap End:&nbsp;&nbsp;{$i.entry.end|regex_replace:"/[0-9]+T/":""}
{/if} </small>
</small></td> {/if}
</td>
{else}
<td bgcolor="lightblue" width="80" height="{$SCHEDULER->_oneOrMore($i.length/$_divisor)}">
</td>
{/if}
</tr> </tr>
{/foreach} {/foreach}
</table> </table>
{/if}
</td> </td>
{/foreach} {/foreach}
</tr> </tr>

View file

@ -266,12 +266,13 @@ class uiHandler extends uiBase {
} }
} }
$data = $this->_dateArr2Str($mData); $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); $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'); $this->_retMsg('Metadata saved');
$type = $this->gb->getFileType($id)=='webstream' ? 'Webstream' : 'File';
$this->redirUrl = UI_BROWSER."?act=editItem&id=$id"; $this->redirUrl = UI_BROWSER."?act=editItem&id=$id";
} }

View file

@ -84,44 +84,46 @@ class uiScheduler extends uiCalendar
function getDayTiming($year, $month, $day) 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 !! ## !! 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_start = $this->_datetime2timestamp($year.$month.$day.'T00:00:00');
$day_end = $this->_datetime2timestamp($year.$month.$day.'T23:59:59'); $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); $curr = current($arr);
if (strtotime($curr['start']) > $day_start) ## insert gap if first entry start after 00:00:00 if (strtotime($curr['start']) > $day_start) ## insert gap if first entry start after 00:00:00
$list[] = array( $list[] = array(
'type' => 'firstgap', 'type' => 'gap',
'pos' => 0, #'pos' => 0,
'length' => strtotime($curr['start']) - $day_start -1 'length' => strtotime($curr['start']) - $day_start
); );
while ($curr = current($arr)) { while ($curr = current($arr)) {
$list[] = array( $list[] = array(
'type' => 'entry', 'type' => 'entry',
'pos' => strtotime($curr['start']) - $day_start, #'pos' => strtotime($curr['start']) - $day_start,
'length' => strtotime($curr['end']) - strtotime($curr['start']), 'length' => strtotime($curr['end']) - strtotime($curr['start']),
'entry' => $curr 'entry' => $curr
); );
if ($next = next($arr)) { 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( $list[] = array(
'type' => 'gap', 'type' => 'gap',
'pos' => strtotime($curr['start'])-$day_start, #'pos' => strtotime($curr['start'])-$day_start,
'length' => strtotime($next['start']) - strtotime($curr['end']) -1, 'length' => strtotime($next['start']) - strtotime($curr['end']),
); );
} }
else { else {
if (strtotime($curr['end']) < $day_end) ## insert gap if prev entry was not until midnight if (strtotime($curr['end']) < $day_end) ## insert gap if prev entry was not until midnight
$list[] = array( $list[] = array(
'type' => 'lastgap', 'type' => 'gap',
'pos' => strtotime($curr['end']) - $day_start, #'pos' => strtotime($curr['end']) - $day_start,
'length' => $day_end-strtotime($curr['end']), '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) function _scheduledDays($period)
{ {
if ($period=='month') { if ($period=='month') {