*** empty log message ***
This commit is contained in:
parent
809cb83c49
commit
c683356fd0
|
@ -2979,7 +2979,7 @@
|
|||
|
||||
* libs/Smarty.class.php
|
||||
libs/Smarty_Compiler.class.php:
|
||||
added CVS $Id: ChangeLog,v 1.3 2005/02/24 14:00:15 sebastian Exp $
|
||||
added CVS $Id: ChangeLog,v 1.4 2005/02/24 19:51:06 sebastian Exp $
|
||||
|
||||
2003-03-31 Messju Mohr <messju@lammfellpuschen.de>
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* @package Smarty
|
||||
*/
|
||||
|
||||
/* $Id: Config_File.class.php,v 1.3 2005/02/24 14:00:15 sebastian Exp $ */
|
||||
/* $Id: Config_File.class.php,v 1.4 2005/02/24 19:51:06 sebastian Exp $ */
|
||||
|
||||
/**
|
||||
* Config file reading class
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
* @version 2.6.6
|
||||
*/
|
||||
|
||||
/* $Id: Smarty.class.php,v 1.3 2005/02/24 14:00:15 sebastian Exp $ */
|
||||
/* $Id: Smarty.class.php,v 1.4 2005/02/24 19:51:06 sebastian Exp $ */
|
||||
|
||||
/**
|
||||
* DIR_SEP isn't used anymore, but third party apps might
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @package Smarty
|
||||
*/
|
||||
|
||||
/* $Id: Smarty_Compiler.class.php,v 1.3 2005/02/24 14:00:15 sebastian Exp $ */
|
||||
/* $Id: Smarty_Compiler.class.php,v 1.4 2005/02/24 19:51:06 sebastian Exp $ */
|
||||
|
||||
/**
|
||||
* Template compiling class
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
Author : $Author: sebastian $
|
||||
Version : $Revision: 1.15 $
|
||||
Version : $Revision: 1.16 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/htmlUI/var/Attic/conf.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -134,6 +134,7 @@ define('UI_QFORM_ERROR', '../templates/sub/form_error.tpl');
|
|||
define('UI_SEARCH_MAX_ROWS', 8);
|
||||
define('UI_SEARCH_MIN_ROWS', 2);
|
||||
define('UI_REGEX_URL', '/^(ht|f)tps?:\/\/[^ ]+$/');
|
||||
define('UI_PL_ACCESSTOKEN_KEY', 'playlistToken');
|
||||
define('UI_SCRATCHPAD_KEY', 'djBagContents');
|
||||
define('UI_SCRATCHPAD_MAXLENGTH_KEY', 'djBagMaxlength');
|
||||
#define('UI_SCRATCHPAD_REGEX', '/^[0-9a-f]{16}:[0-9]{4}-[0-9]{2}-[0-9]{2}$/');
|
||||
|
|
|
@ -16,14 +16,14 @@ $ui_fmask = array(
|
|||
'element' => 'stationMaxfilesize',
|
||||
'isPref' => TRUE,
|
||||
'type' => 'text',
|
||||
'label' => 'Maximum File Size for Upload',
|
||||
'required' => TRUE,
|
||||
'label' => 'Reduce Upload Filesize<br><small>(must be smaller than ' .ini_get('upload_max_filesize').')</small>',
|
||||
'rule' => 'numeric',
|
||||
/*
|
||||
'attributes' => array(
|
||||
'onClick' => 'alert ("Note: System Maximum is set to '.
|
||||
strtr(ini_get('upload_max_filesize'), array('M'=>'000000', 'k'=>'000'))
|
||||
.' in php.ini\n You cannot override this here.")'
|
||||
)
|
||||
) */
|
||||
),
|
||||
array(
|
||||
'rule' => 'nopunctuation',
|
||||
|
|
|
@ -43,7 +43,7 @@ if (is_array($_REQUEST['popup'])){
|
|||
if ($uiBrowser->userid) {
|
||||
$Smarty->assign('showMenuTop', TRUE);
|
||||
$Smarty->assign('SCRATCHPAD', $uiBrowser->SCRATCHPAD->get());
|
||||
$Smarty->assign('PLAYLIST', $uiBrowser->PLAYLIST->get());
|
||||
$Smarty->assign('PLAYLIST', $uiBrowser->PLAYLIST->get());
|
||||
|
||||
switch ($_REQUEST['act']){
|
||||
case "fileBrowse":
|
||||
|
|
|
@ -144,11 +144,26 @@ switch($_REQUEST['act']){
|
|||
$uiHandler->SEARCH->setOffset($_REQUEST['page']);
|
||||
break;
|
||||
|
||||
case "activatePL":
|
||||
case "PL.activate":
|
||||
$uiHandler->PLAYLIST->activate($_REQUEST['id']);
|
||||
$uiHandler->PLAYLIST->setReload();
|
||||
break;
|
||||
|
||||
case "PL.newUsingItem":
|
||||
$uiHandler->PLAYLIST->newUsingItem($_REQUEST['id']);
|
||||
$uiHandler->PLAYLIST->setReload();
|
||||
break;
|
||||
|
||||
case "PL.addItem":
|
||||
$uiHandler->PLAYLIST->addItem($_REQUEST['id']);
|
||||
$uiHandler->PLAYLIST->setReload();
|
||||
break;
|
||||
|
||||
case "PL.release":
|
||||
$uiHandler->PLAYLIST->release();
|
||||
$uiHandler->PLAYLIST->setReload();
|
||||
break;
|
||||
|
||||
default:
|
||||
$_SESSION["alertMsg"] = tra("Unknown method: $1", $_REQUEST["act"]);
|
||||
header("Location: ".UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close');
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!-- $Id: smarty-dynamic-fancygroup.tpl,v 1.3 2005/02/24 14:00:15 sebastian Exp $ -->
|
||||
<!-- $Id: smarty-dynamic-fancygroup.tpl,v 1.4 2005/02/24 19:51:06 sebastian Exp $ -->
|
||||
|
||||
<tr>
|
||||
<td valign="top" align="right">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!-- $Id: smarty-dynamic-green.tpl,v 1.3 2005/02/24 14:00:15 sebastian Exp $ -->
|
||||
<!-- $Id: smarty-dynamic-green.tpl,v 1.4 2005/02/24 19:51:06 sebastian Exp $ -->
|
||||
|
||||
<tr>
|
||||
<td align="right" valign="top" class="green"><b>{$element.label}:</b></td>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!-- $Id: smarty-dynamic.tpl,v 1.3 2005/02/24 14:00:15 sebastian Exp $ -->
|
||||
<!-- $Id: smarty-dynamic.tpl,v 1.4 2005/02/24 19:51:06 sebastian Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<title>Smarty template for Array renderer</title>
|
||||
|
|
|
@ -14,9 +14,17 @@
|
|||
<tr bgcolor="{cycle values='#eeeeee, #dadada"'}"
|
||||
onMouseOver="highlight()" onMouseOut="darklight()"
|
||||
onContextmenu="return menu('{$i.id}'
|
||||
{if $i.type == ('audioclip' || 'webstream')}
|
||||
{if ($i.type == 'audioclip' || $i.type == 'webstream')}
|
||||
,'PL.addItem', 'PL.newUsingItem', 'SP.addItem', 'delete'
|
||||
{/if}
|
||||
{if ($i.type == 'playlist')}
|
||||
,'PL.activate'
|
||||
{if $PLAYLIST.id == $i.id}
|
||||
,'PL.release'
|
||||
{else}
|
||||
,'PL.addItem', 'SP.addItem', 'delete'
|
||||
{/if}
|
||||
{/if}
|
||||
)"
|
||||
>
|
||||
<td align="center">
|
||||
|
|
|
@ -20,9 +20,17 @@
|
|||
<tr style="background-color: {cycle values='#eeeeee, #dadada'}"
|
||||
onMouseOver="highlight()" onMouseOut="darklight()"
|
||||
onContextmenu="return menu('{$i.id}'
|
||||
{if $i.type == ('audioclip' || 'webstream')}
|
||||
{if ($i.type == 'audioclip' || $i.type == 'webstream')}
|
||||
,'PL.addItem', 'PL.newUsingItem', 'SP.removeItem', 'delete'
|
||||
{/if}
|
||||
{if ($i.type == 'playlist')}
|
||||
,'PL.activate'
|
||||
{if $PLAYLIST.id == $i.id}
|
||||
,'PL.release'
|
||||
{else}
|
||||
,'PL.addItem', 'SP.removeItem', 'delete'
|
||||
{/if}
|
||||
{/if}
|
||||
)"
|
||||
>
|
||||
<td><input type="checkbox" name="{$i.id}"></td>
|
||||
|
|
|
@ -8,7 +8,7 @@ nn6=(document.getElementById && !document.all)?1:0;
|
|||
menuStatus = 0;
|
||||
document.onmouseup = hideMenu;
|
||||
document.write('<div id="menucontainer"></div>');
|
||||
menuWidth = 160,
|
||||
menuWidth = 180,
|
||||
menuHeight = 0;
|
||||
|
||||
function menu(id) {
|
||||
|
@ -24,26 +24,43 @@ function menu(id) {
|
|||
|
||||
for (var i = 1; i < menu.arguments.length; ++i) {
|
||||
switch (menu.arguments[i]) {
|
||||
case "PL.activate":
|
||||
menuHtml = menuHtml + "<tr><td><a class='menu' href=\"{/literal}javascript: hpopup('{$UI_HANDLER}?act=activatePL&id="+id+"', 'activatePL'){literal}\""+oF+"> Activate this Playlist </a></td></tr>";
|
||||
break;
|
||||
case "PL.display":
|
||||
menuHtml = menuHtml + "<tr><td><a class='menu' href=\"{/literal}{$UI_BROWSER}?act=PL.display&id="+id+"{literal}\""+oF+"> Display this Playlist </a></td></tr>";
|
||||
break;
|
||||
case "PL.addItem":
|
||||
menuHtml = menuHtml + "<tr><td><a class='menu' href='#' onClick=\"hpopup('{/literal}{$UI_HANDLER}{literal}?act=PL.addItem&id="+id+"', '2SP')\""+oF+"> Add File to Playlist </a></td></tr>";
|
||||
menuHtml = menuHtml + "<tr><td><a class='menu' href=\"{/literal}{$UI_BROWSER}{literal}?act=PL.display&id="+id+"\" "+oF+"> Display this Playlist </a></td></tr>";
|
||||
break;
|
||||
{/literal}
|
||||
{if $PLAYLIST.id}
|
||||
|
||||
{literal}
|
||||
case "PL.release":
|
||||
menuHtml = menuHtml + "<tr><td><a class='menu' href='#' onClick=\"hpopup('{/literal}{$UI_HANDLER}{literal}?act=PL.release')\" "+oF+"> Release Playlist </a></td></tr>";
|
||||
break;
|
||||
{/literal}
|
||||
|
||||
{literal}
|
||||
case "PL.addItem":
|
||||
menuHtml = menuHtml + "<tr><td><a class='menu' href='#' onClick=\"hpopup('{/literal}{$UI_HANDLER}{literal}?act=PL.addItem&id="+id+"')\" "+oF+"> Add Item to active Playlist </a></td></tr>";
|
||||
break;
|
||||
{/literal}
|
||||
|
||||
{else}
|
||||
{literal}
|
||||
case "PL.activate":
|
||||
menuHtml = menuHtml + "<tr><td><a class='menu' href=\"javascript: hpopup('{/literal}{$UI_HANDLER}{literal}?act=PL.activate&id="+id+"')\" "+oF+"> Activate this Playlist </a></td></tr>";
|
||||
break;
|
||||
{/literal}
|
||||
{/if}
|
||||
{literal}
|
||||
case "PL.newUsingItem":
|
||||
menuHtml = menuHtml + "<tr><td><a class='menu' href='#'"+oF+"> New Playlist using File </a></td></tr>";
|
||||
menuHtml = menuHtml + "<tr><td><a class='menu' href='#' onClick=\"hpopup('{/literal}{$UI_HANDLER}{literal}?act=PL.newUsingItem&id="+id+"')\" "+oF+"> New Playlist using Item </a></td></tr>";
|
||||
break;
|
||||
case "SP.addItem":
|
||||
menuHtml = menuHtml + "<tr><td><a class='menu' href='#' onClick=\"hpopup('{/literal}{$UI_HANDLER}{literal}?act=SP.addItem&id="+id+"', '2SP')\""+oF+"> Add File to ScratchPad </a></td></tr>";
|
||||
menuHtml = menuHtml + "<tr><td><a class='menu' href='#' onClick=\"hpopup('{/literal}{$UI_HANDLER}{literal}?act=SP.addItem&id="+id+"')\" "+oF+"> Add Item to ScratchPad </a></td></tr>";
|
||||
break;
|
||||
case "SP.removeItem":
|
||||
menuHtml = menuHtml + "<tr><td><a class='menu' href='#' onClick=\"hpopup('{/literal}{$UI_HANDLER}{literal}?act=SP.removeItem&id="+id+"', '2SP')\""+oF+"> Remove </a></td></tr>";
|
||||
menuHtml = menuHtml + "<tr><td><a class='menu' href='#' onClick=\"hpopup('{/literal}{$UI_HANDLER}{literal}?act=SP.removeItem&id="+id+"')\" "+oF+"> Remove </a></td></tr>";
|
||||
break;
|
||||
case "delete":
|
||||
menuHtml = menuHtml + "<tr><td><a class='menu' href='{/literal}{$UI_HANDLER}{literal}?act=delete&id="+id+"'"+oF+"> !Delete File! </a></td></tr>";
|
||||
menuHtml = menuHtml + "<tr><td><a class='menu' href='{/literal}{$UI_HANDLER}{literal}?act=delete&id="+id+"'"+oF+"> !Delete Item! </a></td></tr>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,6 +91,7 @@ class uiBase
|
|||
$this->pid = $this->gb->getparent($this->id) != 1 ? $this->gb->getparent($this->id) : FALSE;
|
||||
$this->type = $this->gb->getFileType($this->id);
|
||||
$this->fid = $this->type=='Folder' ? $this->id : $this->pid;
|
||||
$this->homeid = $this->gb->getObjId($this->login, $this->gb->storId);
|
||||
$this->InputTextStandardAttrib = array('size' =>UI_INPUT_STANDARD_SIZE,
|
||||
'maxlength'=>UI_INPUT_STANDARD_MAXLENGTH);
|
||||
$this->STATIONPREFS =& $_SESSION[UI_STATIONINFO_SESSNAME];
|
||||
|
@ -113,9 +114,13 @@ class uiBase
|
|||
}
|
||||
}
|
||||
}
|
||||
if (!$this->STATIONPREFS['stationMaxfilesize'])
|
||||
$this->STATIONPREFS['stationMaxfilesize'] = strtr(ini_get('upload_max_filesize'), array('M'=>'000000', 'k'=>'000'));
|
||||
/*
|
||||
if ($miss && $this->login) {
|
||||
$this->_retMsg('Note: Station Preferences not setup.');
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -280,7 +280,11 @@ class uiHandler extends uiBase {
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
$r = $this->gb->deleteFile($id, $this->sessid);
|
||||
if ($this->gb->getFileType($id)=='playlist') {
|
||||
$r = $this->gb->deletePlaylist($id, $this->sessid);
|
||||
} else {
|
||||
$r = $this->gb->deleteFile($id, $this->sessid);
|
||||
}
|
||||
if(PEAR::isError($r)) {
|
||||
$this->_retMsg($r->getMessage());
|
||||
return FALSE;
|
||||
|
|
|
@ -3,8 +3,8 @@ class uiPlaylist
|
|||
{
|
||||
function uiPlaylist(&$uiBase)
|
||||
{
|
||||
$this->Base =& $uiBase;
|
||||
$this->items =& $_SESSION[UI_PLAYLIST_SESSNAME]['content'];
|
||||
$this->Base =& $uiBase;
|
||||
$this->active =& $_SESSION[UI_PLAYLIST_SESSNAME]['active'];
|
||||
$this->reloadUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
|
||||
}
|
||||
|
||||
|
@ -15,13 +15,45 @@ class uiPlaylist
|
|||
|
||||
function get()
|
||||
{ #print_r($this->items);
|
||||
return $this->items;
|
||||
return is_array($this->active) ? $this->active : FALSE;
|
||||
}
|
||||
|
||||
function activate($id)
|
||||
function activate($plid)
|
||||
{
|
||||
$this->items = $this->Base->gb->getPlaylistArray($id, $this->Base->sessid);
|
||||
$this->Base->_retMsg('Playlist $1 activated', $this->Base->_getMDataValue($id, 'title'));
|
||||
# test if PL available
|
||||
# look PL
|
||||
# store access token to ls_pref
|
||||
# load PL into session
|
||||
if(is_string($this->Base->gb->loadPref($this->Base->sessid, UI_PL_ACCESSTOKEN_KEY))) {
|
||||
$this->Base->_retMsg('You have an Playlist already activated,\n first close it');
|
||||
return FALSE;
|
||||
}
|
||||
if($this->Base->gb->playlistIsAvailable($plid, $this->Base->sessid) !== TRUE) {
|
||||
$this->Base->_retMsg('Playlist is looked');
|
||||
return FALSE;
|
||||
}
|
||||
$token = $this->Base->gb->lockPlaylistForEdit($plid, $this->Base->sessid);
|
||||
$this->Base->gb->savePref($this->Base->sessid, UI_PL_ACCESSTOKEN_KEY, $token);
|
||||
$this->active = $this->Base->gb->getPlaylistArray($plid, $this->Base->sessid);
|
||||
$this->active['id'] = $plid;
|
||||
$this->Base->_retMsg('Playlist "$1" activated', $this->Base->_getMDataValue($plid, 'title'));
|
||||
}
|
||||
|
||||
function release()
|
||||
{
|
||||
# get token from ls_pref
|
||||
# release PL
|
||||
# delete PL from session
|
||||
# remove token from ls_pref
|
||||
if(!is_string($token = $this->Base->gb->loadPref($this->Base->sessid, UI_PL_ACCESSTOKEN_KEY))) {
|
||||
$this->Base->_retMsg('No Playlist is looked by You');
|
||||
return FALSE;
|
||||
}
|
||||
$plgunid = $this->Base->gb->releaseLockedPlaylist($token, $this->Base->sessid);
|
||||
$this->Base->_retMsg('Playlist "$1" released', $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($plgunid), 'title'));
|
||||
$this->active = NULL;
|
||||
$this->Base->gb->delPref($this->Base->sessid, UI_PL_ACCESSTOKEN_KEY);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
function addItem($id)
|
||||
|
@ -35,4 +67,21 @@ class uiPlaylist
|
|||
|
||||
|
||||
}
|
||||
|
||||
function newUsingItem($id)
|
||||
{
|
||||
# create PL
|
||||
# activate
|
||||
# add clip
|
||||
if (!$plid = $this->Base->gb->createPlaylist($this->Base->homeid, date('Y-M-D H-i-s'), $this->Base->sessid)) {
|
||||
$this->Base->_retMsg('Cannot create Playlist');
|
||||
return FALSE;
|
||||
}
|
||||
$this->activate($plid);
|
||||
if (!$this->Base->gb->addAudioClipToPlaylist($token, $id, $this->Base->sessid)) {
|
||||
$this->Base_retMsg('Cannot add File to Playlist');
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue