*** empty log message ***

This commit is contained in:
sebastian 2005-06-11 19:00:52 +00:00
parent 7d5f6d89bc
commit 3610756880
8 changed files with 38 additions and 36 deletions

View file

@ -86,8 +86,10 @@ function S_getHour($param)
## input format is HH:MM:SS.dddddd ## input format is HH:MM:SS.dddddd
extract ($param); extract ($param);
list ($h, $m, $s) = explode (':', $time); list ($h, $m, $s) = explode (':', $time);
settype($h, 'integer'); $curr = mktime($h, $m ,$s);
return $h; if ($pause) $curr = strtotime(UI_SCHEDULER_PAUSE_PL2PL, $curr);
return strftime("%H", $curr);
} }
function S_getMinute($param) function S_getMinute($param)
@ -95,8 +97,10 @@ function S_getMinute($param)
## input format is HH:MM:SS.dddddd ## input format is HH:MM:SS.dddddd
extract ($param); extract ($param);
list ($h, $m, $s) = explode (':', $time); list ($h, $m, $s) = explode (':', $time);
settype($m, 'integer'); $curr = mktime($h, $m ,$s);
return $m; if ($pause) $curr = strtotime(UI_SCHEDULER_PAUSE_PL2PL, $curr);
return strftime("%M", $curr);
} }
function S_getSecond($param) function S_getSecond($param)
@ -104,9 +108,10 @@ function S_getSecond($param)
## input format is HH:MM:SS.dddddd ## input format is HH:MM:SS.dddddd
extract ($param); extract ($param);
list ($h, $m, $s) = explode (':', $time); list ($h, $m, $s) = explode (':', $time);
if ($plus) $s += $plus; $curr = mktime($h, $m ,$s);
settype($s, 'integer'); if ($pause) $curr = strtotime(UI_SCHEDULER_PAUSE_PL2PL, $curr);
return $s;
return strftime("%S", $curr);
} }

View file

@ -6,7 +6,7 @@
<div class="container_elements"> <div class="container_elements">
<h1>##Daily View##</h1> <h1>##Daily View##</h1>
<div class="clearer">&nbsp;</div> <div class="clearer">&nbsp;</div>
<p>{$SCHEDULER->curr.monthname} {$SCHEDULER->curr.day}, {$SCHEDULER->curr.year}</p> <p>##{$SCHEDULER->curr.monthname}## {$SCHEDULER->curr.day}, {$SCHEDULER->curr.year}</p>
<form name="SCHEDULER"> <form name="SCHEDULER">
<table class="scheduler_day" style="width: 606px;"> <table class="scheduler_day" style="width: 606px;">
@ -14,7 +14,7 @@
{* Tag vor/zurück + code um heutigen Tag abzufragen {* Tag vor/zurück + code um heutigen Tag abzufragen
<tr> <tr>
<th><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&day=--')"><<</a></th> <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 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> <th><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&day=%2B%2B')">>></a></th>
</tr> </tr>
*} *}
@ -25,8 +25,8 @@
<td style="width: 30px"><input type="checkbox" name="all" onClick="collector_switchAll('SCHEDULER')"></td> <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>
{foreach from=$_scale item="_hour"} {foreach from=$_scale item="_hour"}
@ -44,7 +44,7 @@
{$i.start}-{$i.end} {$i.start}-{$i.end}
{$i.creator} {$i.creator}
</div> </div>
{* <div style="background-color: #FF6F1F; height: 3px" {include file="scheduler/week_additem.tpl"}></div> *} {include file="scheduler/between_additem.tpl"}
{/foreach} {/foreach}
</td> </td>

View file

@ -8,7 +8,7 @@
<table class="scheduler_month"> <table class="scheduler_month">
<tr> <tr>
{foreach from=$SCHEDULER->Week item="_Weekday"} {foreach from=$SCHEDULER->Week item="_Weekday"}
<th>{$_Weekday.label.full}</th> <th>##{$_Weekday.label.full}##</th>
{/foreach} {/foreach}
</tr> </tr>

View file

@ -22,7 +22,7 @@
<th class="firstrow" style="border-left: 1px solid #ccc"></th> <th class="firstrow" style="border-left: 1px solid #ccc"></th>
{foreach from=$SCHEDULER->Week item="_Day"} {* hier werden die Tagesnamen angezeigt *} {foreach from=$SCHEDULER->Week item="_Day"} {* hier werden die Tagesnamen angezeigt *}
<th class="date"></th> <th class="date"></th>
<th class="day"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day&day={$_Day.day}&month={$_Day.month}&year={$_Day.year}')">{$_Day.label.full}</a></th> <th class="day"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day&day={$_Day.day}&month={$_Day.month}&year={$_Day.year}')">##{$_Day.label.full}##</a></th>
{/foreach} {/foreach}
{* Link Woche vor <a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=%2B%2B')">>></a> *} {* Link Woche vor <a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=%2B%2B')">>></a> *}
</tr> </tr>
@ -56,7 +56,7 @@
<p>{$i.start|truncate:8:""} - {$i.end|truncate:8:""}</p> <p>{$i.start|truncate:8:""} - {$i.end|truncate:8:""}</p>
<p>{$i.creator}</p> <p>{$i.creator}</p>
</div> </div>
{* <div style="background-color: #FF6F1F; height: 3px" {include file="scheduler/week_additem.tpl"}></div> *} {include file="scheduler/between_additem.tpl"}
{/foreach} {/foreach}
</td> </td>
{else} {else}

View file

@ -1,11 +1,3 @@
style="cursor: pointer" style="cursor: pointer"
{getHour time=$i.end assign="_endH"}
{if $_endH == $_hour}
onClick="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={getHour time=$i.end}&minute={getMinute time=$i.end}&second={getSecond time=$i.end}', 'SCHEDULER.addItem')"
{else}
onClick="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={$_hour}&minute=0&second=0', 'SCHEDULER.addItem')" onClick="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={$_hour}&minute=0&second=0', 'SCHEDULER.addItem')"
{/if}
{assign var="_endH" value=null}

View file

@ -348,7 +348,7 @@ class uiBase
} }
function _getMDataValue($id, $key, $langid=FALSE, $deflangid=UI_DEFAULT_LANGID) function _getMDataValue($id, $key, $langid=NULL, $deflangid=UI_DEFAULT_LANGID)
{ {
if (!$langid) $langid = $_SESSION['langid']; if (!$langid) $langid = $_SESSION['langid'];
@ -360,11 +360,14 @@ class uiBase
} }
function _setMDataValue($id, $key, $value, $langid=UI_DEFAULT_LANGID) function _setMDataValue($id, $key, $value, $langid=NULL)
{ {
if (!$langid) $langid = $_SESSION['langid'];
if ($this->gb->setMDataValue($id, $key, $this->sessid, $value, $langid)) { if ($this->gb->setMDataValue($id, $key, $this->sessid, $value, $langid)) {
return TRUE; return TRUE;
} }
return FALSE; return FALSE;
} }

View file

@ -132,6 +132,7 @@ class uiHandler extends uiBase {
$r = $this->gb->putFile($folderId, $formdata['mediafile']['name'], $ntmp, NULL, $this->sessid, $replace); $r = $this->gb->putFile($folderId, $formdata['mediafile']['name'], $ntmp, NULL, $this->sessid, $replace);
@unlink($ntmp); @unlink($ntmp);
if(PEAR::isError($r)) { if(PEAR::isError($r)) {
$this->_retMsg($r->getMessage()); $this->_retMsg($r->getMessage());
$this->redirUrl = UI_BROWSER."?act=editFile&id=".$id; $this->redirUrl = UI_BROWSER."?act=editFile&id=".$id;
@ -141,6 +142,11 @@ class uiHandler extends uiBase {
$this->_setMDataValue($r, UI_MDATA_KEY_TITLE, $formdata['mediafile']['name']); $this->_setMDataValue($r, UI_MDATA_KEY_TITLE, $formdata['mediafile']['name']);
$this->transMData($r); $this->transMData($r);
if ($_SESSION['langid'] != UI_DEFAULT_LANGID) { // set records in default language too
$this->_setMDataValue($r, UI_MDATA_KEY_TITLE, $formdata['mediafile']['name'], UI_DEFAULT_LANGID);
$this->transMData($r, UI_DEFAULT_LANGID);
}
$this->redirUrl = UI_BROWSER."?act=editFile&id=$r"; $this->redirUrl = UI_BROWSER."?act=editFile&id=$r";
if (UI_VERBOSE) $this->_retMsg('Audioclip Data saved'); if (UI_VERBOSE) $this->_retMsg('Audioclip Data saved');
return $r; return $r;
@ -158,14 +164,11 @@ class uiHandler extends uiBase {
} }
function transMData($id) function transMData($id, $langid=NULL)
{ {
include dirname(__FILE__).'/formmask/metadata.inc.php'; include dirname(__FILE__).'/formmask/metadata.inc.php';
#$this->gb->replaceMetadata($id, $this->_analyzeFile($id, 'xml'), 'string', $this->sessid);
$ia = $this->gb->analyzeFile($id, $this->sessid); $ia = $this->gb->analyzeFile($id, $this->sessid);
#print_r($ia);
$this->_setMdataValue($id, UI_MDATA_KEY_DURATION, $this->gb->_secsToPlTime($ia['playtime_seconds'])); $this->_setMdataValue($id, UI_MDATA_KEY_DURATION, $this->gb->_secsToPlTime($ia['playtime_seconds']));
$this->_setMDataValue($id, UI_MDATA_KEY_FORMAT, UI_MDATA_VALUE_FORMAT_FILE); $this->_setMDataValue($id, UI_MDATA_KEY_FORMAT, UI_MDATA_VALUE_FORMAT_FILE);
@ -181,8 +184,7 @@ class uiHandler extends uiBase {
if ($v['id3'] != FALSE) { if ($v['id3'] != FALSE) {
$key = strtolower($v['id3']); $key = strtolower($v['id3']);
if ($ia['comments'][$key][0]) { if ($ia['comments'][$key][0]) {
$this->_setMdataValue($id, $v['element'], $ia['comments'][$key][0]); $this->_setMdataValue($id, $v['element'], $ia['comments'][$key][0], $langid);
#echo "E: ".$v['element']." V: ".$ia['comments'][$key][0]."<br>";
} }
} }
} }