*** empty log message ***

This commit is contained in:
sebastian 2005-03-08 21:29:20 +00:00
parent 28bd61965d
commit a954d4891c
2 changed files with 14 additions and 7 deletions

View File

@ -20,7 +20,7 @@
<td>&nbsp;</td>
{else}
<td width="80">
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&day={$_Day.day}')">{$_Day.day}
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&day={$_Day.day}')">{$_Day.day}
<div><img src="img/percentage_red.png" width="{if $percentage>50}{$percentage}{elseif $percentage>0}{$percentage+2}{else}0{/if}%" height="10" border="0"><img src="img/percentage_blue.png" width="{if $percentage>50}{$null-$percentage+100}{elseif $percentage>0}{$NULL-$percentage-2+100}{else}100{/if}%" height="10" border="0"></div>
</td>
{/if}

View File

@ -53,7 +53,7 @@ class uiScheduler extends uiCalendar
function _datetime2timestamp($i)
{
$formatted = $i[0].$i[1].$i[2].$i[3].'-'.$i[6].$i[7].'-'.$i[4].$i[5].strrchr($i, 'T');
$formatted = $i[0].$i[1].$i[2].$i[3].'-'.$i[4].$i[5].'-'.$i[6].$i[7].strrchr($i, 'T');
#echo $formatted;
return strtotime($formatted);
}
@ -71,16 +71,19 @@ class uiScheduler extends uiCalendar
function getDayUsagePercentage($year, $month, $day)
{
#echo "date: ".$year.$month.$day."<br>";
if (isset($this->_duration[$year.$month.$day]))
return $this->_duration[$year.$month.$day];
$this->_duration[$year.$month.$day] = 0;
if (!$arr = $this->getDayUsage($year, $month, $day))
return false;
foreach ($arr as $val) {
$this->_duration[$year.$month.$day] =+ ($this->_datetime2timestamp($val['end'])-$this->_datetime2timestamp($val['start']))/86400*100;
foreach ($arr as $val) {
#print_r($val);
$this->_duration[$year.$month.$day] += ($this->_datetime2timestamp($val['end'])-$this->_datetime2timestamp($val['start']))/86400*100;
}
#echo "duration: ".$this->_duration[$year.$month.$day]."<br>";
return $this->_duration[$year.$month.$day];
}
@ -109,14 +112,18 @@ class uiScheduler extends uiCalendar
{
$gunid = $formdata['gunid'];
$datetime = $this->curr['year'].$this->curr['month'].$this->curr['day'].'T'.$formdata['time'];
echo $datetime;
#echo $datetime;
$r = $this->spc->UploadPlaylistMethod($this->Base->sessid, $gunid, $datetime.UI_TIMEZONE);
#var_dump($r);
#print_r($r);
if (is_array($r['error']))
$this->Base->_retMsg('Eroor: $1', $r['error']['message']);
if (isset($r['scheduleEntryId']))
$this->Base->_retMsg('ScheduleId: $1', $r['scheduleEntryId']);
}
function displayScheduleMethod($from, $to)
{
{ #echo $from.$to;
$r = $this->spc->displayScheduleMethod($this->Base->sessid, $from, $to);
return $r;
}