*** empty log message ***

This commit is contained in:
sebastian 2005-02-28 10:15:29 +00:00
parent f807c93626
commit c351c49c7c
9 changed files with 43 additions and 34 deletions

View File

@ -23,7 +23,7 @@
Author : $Author: sebastian $
Version : $Revision: 1.18 $
Version : $Revision: 1.19 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/htmlUI/var/Attic/conf.php,v $
------------------------------------------------------------------------------*/
@ -143,6 +143,7 @@ define('UI_SCRATCHPAD_MAXLENGTH_KEY', 'djBagMaxlength');
define('UI_SCRATCHPAD_SESSNAME', 'SCRATCHPAD');
define('UI_STATIONINFO_SESSNAME', 'STATIONINFO');
define('UI_SEARCH_SESSNAME', 'SEARCH');
define('UI_PLAYLIST_SESSNAME', 'PLAYLIST');
define('UI_MDATA_KEY_TITLE', 'dc:title');
define('UI_MDATA_KEY_ARTIST', 'dc:creator');

View File

@ -35,6 +35,11 @@ if (is_array($_REQUEST['popup'])){
$Smarty->assign('loginform', $uiBrowser->loginform($Smarty, $ui_fmask));
$Smarty->display('popup/login.tpl');
break;
case "_2PL.simpleManagement":
$Smarty->assign('target', 'PL.simpleManagement');
$Smarty->display('popup/_redirector.tpl');
break;
}
}
die();

View File

@ -4,20 +4,19 @@ require dirname(__FILE__).'/../ui_handler_init.php';
switch($_REQUEST['act']){
case "login":
if (($ui_tmp_sessid = $uiHandler->login($_REQUEST, $ui_fmask["login"])) !== FALSE) {
$uiHandler->PLAYLIST->testForLooked();
}
if ($uiHandler->login($_REQUEST, $ui_fmask["login"]) === TRUE)
$uiHandler->PLAYLIST->loadLookedFromPref();
break;
case "logout":
$uiHandler->SCRATCHPAD->save();
$uiHandler->PLAYLIST->testForLooked();
$uiHandler->PLAYLIST->release();
$uiHandler->logout();
break;
case "signover":
$uiHandler->SCRATCHPAD->save();
$uiHandler->PLAYLIST->testForLooked();
$uiHandler->PLAYLIST->release();
$uiHandler->logout(TRUE);
break;

View File

@ -4,8 +4,8 @@
{PL->getFlat assign='FLAT'}
{foreach from=$FLAT item='i'}
{* {uiBrowser->_niceTime p1=$i.playlength assign='nicelength'} *}
<tr onMouseOver="highlight()" onMouseOut="darklight()" onContextmenu="return menu('{$i.id}', 'PL.removeItem')" style="background-color: {cycle values='#eeeeee, #dadada'}">
<td><input type="checkbox" name="{$i.id}"></td>
<tr onMouseOver="highlight()" onMouseOut="darklight()" onContextmenu="return menu('{$i.attrs.id}', 'PL.removeItem')" style="background-color: {cycle values='#eeeeee, #dadada'}">
<td><input type="checkbox" name="{$i.attrs.id}"></td>
<td>{$i.title}</td>
<td>{$i.duration}</td>
<td>{$i.type}</td>

View File

@ -13,7 +13,7 @@
{include file="playlist/editor.tpl"}
{else} {* no active Playlist *}
<tr><td colspan="4">No active Playlist!</td></tr>
<tr><td colspan="4"><input type="button" value="Make new Playlist" onClick="hpopup('{$UI_HANDLER}?act=PL.create')"></td></tr>
<tr><td colspan="4"><input type="button" value="Create empty Playlist" onClick="hpopup('{$UI_HANDLER}?act=PL.create')"></td></tr>
{/if}
</table>

View File

@ -279,10 +279,11 @@ class uiBase
function _twoDigits($num)
{
if (strlen($num)<2)
return ("0$num");
else
return $num;
if (strlen($num) == 1)
return "0$num";
if (strlen($num) == 0)
return '00';
return $num;
}

View File

@ -38,8 +38,7 @@ class uiHandler extends uiBase {
*/
function login(&$formdata, &$mask)
{
session_destroy();
session_start();
#$this->_cleanArray($_SESSION);
if (!$this->_validateForm($formdata, $mask)) {
$_SESSION['retransferFormData']['login']=$formdata['login'];

View File

@ -19,7 +19,7 @@ class uiPlaylist
if (!$this->activeId) {
return FALSE;
}
#print_r( $this->Base->gb->getPlaylistArray($this->activeId, $this->Base->sessid));
print_r( $this->Base->gb->getPlaylistArray($this->activeId, $this->Base->sessid));
return $this->Base->gb->getPlaylistArray($this->activeId, $this->Base->sessid);
}
@ -38,8 +38,7 @@ class uiPlaylist
return FALSE;
}
$this->token = $this->Base->gb->lockPlaylistForEdit($plid, $this->Base->sessid);
$this->Base->gb->savePref($this->Base->sessid, UI_PL_ACCESSTOKEN_KEY, $this->token);
#$this->active = $this->Base->gb->getPlaylistArray($plid, $this->Base->sessid);
$this->Base->gb->savePref($this->Base->sessid, UI_PL_ACCESSTOKEN_KEY, $plid.':'.$this->token);
$this->activeId = $plid;
$this->Base->_retMsg('Playlist "$1" activated', $this->Base->_getMDataValue($plid, UI_MDATA_KEY_TITLE));
return TRUE;
@ -87,11 +86,14 @@ class uiPlaylist
}
function testForLooked()
function loadLookedFromPref()
{
if(is_string($this->token = $this->Base->gb->loadPref($this->Base->sessid, UI_PL_ACCESSTOKEN_KEY))) {
$this->Base->_retMsg('Playlist looked by You was released');
$this->release();
if(is_string($saved = $this->Base->gb->loadPref($this->Base->sessid, UI_PL_ACCESSTOKEN_KEY))) {
$this->Base->_retMsg('Found Playlist looked by you');
#$this->release();
list ($this->activeId, $this->token) = explode (':', $saved);
$this->Base->redirUrl = UI_BROWSER.'?popup[]=_2PL.simpleManagement&popup[]=_close';
return TRUE;
}
return FALSE;
@ -106,17 +108,17 @@ class uiPlaylist
return TRUE;
}
function removeItem($gunids)
function removeItem($elemIds)
{
if (!$gunids) {
if (!$elemIds) {
$this->Base->_retMsg('No Item(s) given');
return FALSE;
}
if (!is_array($gunids))
$gunids = array($gunids);
if (!is_array($elemIds))
$elemIds = array($elemIds);
foreach ($gunids as $gunid) {
if ($this->Base->gb->delAudioClipFromPlaylist($this->token, $this->Base->gb->_idFromGunid($gunid), $this->Base->sessid) !== TRUE) {
foreach ($elemIds as $elemId) {
if ($this->Base->gb->delAudioClipFromPlaylist($this->token, $elemId, $this->Base->sessid) !== TRUE) {
$this->Base->_retMsg('Cannot remove Item from Playlist');
return FALSE;
}
@ -153,21 +155,23 @@ class uiPlaylist
function getFlat()
{
$this->plwalk($this->get(), 0);
$this->plwalk($this->get());
#print_r($this->flat);
return $this->flat;
}
function plwalk($arr, $parent)
function plwalk($arr, $parent=0, $attrs=0)
{
foreach ($arr['children'] as $node=>$sub) {
if ($sub['elementname']=='playlistelement') {
$this->plwalk($sub, $node);
$this->plwalk($sub, $node, $sub['attrs']);
}
if ($sub['elementname']=='audioclip' || $sub['elementname']=='webstream') {
if ($sub['elementname']=='audioclip') {
#$this->flat["$parent.$node"] = $sub['attrs'];
#$this->flat["$parent.$node"]['type'] = $sub['elementname'];
$this->flat["$parent.$node"] = $this->Base->_getMetaInfo($this->Base->gb->_idFromGunid($sub['attrs']['id']));
$this->flat["$parent.$node"]['attrs'] = $attrs;
}
}
}

View File

@ -20,8 +20,8 @@ class uiSearch
$form = new HTML_QuickForm('search', UI_STANDARD_FORM_METHOD, UI_HANDLER);
$form->setConstants(array('id'=>$id, 'counter'=>$this->criteria['counter'] ? $this->criteria['counter'] : UI_SEARCH_MIN_ROWS));
foreach ($mask['tabs']['group']['group'] as $k=>$v) {
foreach ($mask['pages'][$v] as $val){
foreach ($mask['pages'] as $k=>$v) {
foreach ($mask['pages'][$k] as $val){
$col1[$this->Base->_formElementEncode($val['element'])] = $val['label'];
if (isset($val['relation']))
$col2[$this->Base->_formElementEncode($val['element'])] = $mask2['relations'][$val['relation']];