*** empty log message ***
This commit is contained in:
parent
cc2a640933
commit
5fc8fb9d42
|
@ -2979,7 +2979,7 @@
|
|||
|
||||
* libs/Smarty.class.php
|
||||
libs/Smarty_Compiler.class.php:
|
||||
added CVS $Id: ChangeLog,v 1.1 2005/02/23 13:07:34 sebastian Exp $
|
||||
added CVS $Id: ChangeLog,v 1.2 2005/02/23 22:57:14 sebastian Exp $
|
||||
|
||||
2003-03-31 Messju Mohr <messju@lammfellpuschen.de>
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* @package Smarty
|
||||
*/
|
||||
|
||||
/* $Id: Config_File.class.php,v 1.1 2005/02/23 13:04:59 sebastian Exp $ */
|
||||
/* $Id: Config_File.class.php,v 1.2 2005/02/23 22:57:14 sebastian Exp $ */
|
||||
|
||||
/**
|
||||
* Config file reading class
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
* @version 2.6.6
|
||||
*/
|
||||
|
||||
/* $Id: Smarty.class.php,v 1.1 2005/02/23 13:04:59 sebastian Exp $ */
|
||||
/* $Id: Smarty.class.php,v 1.2 2005/02/23 22:57:14 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.1 2005/02/23 13:04:59 sebastian Exp $ */
|
||||
/* $Id: Smarty_Compiler.class.php,v 1.2 2005/02/23 22:57:14 sebastian Exp $ */
|
||||
|
||||
/**
|
||||
* Template compiling class
|
||||
|
|
|
@ -23,13 +23,19 @@
|
|||
|
||||
|
||||
Author : $Author: sebastian $
|
||||
Version : $Revision: 1.13 $
|
||||
Version : $Revision: 1.14 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/htmlUI/var/Attic/conf.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* \file conf.php
|
||||
* storageServer configuration file
|
||||
*/
|
||||
|
||||
/**
|
||||
* configuration structure:
|
||||
*
|
||||
* <dl>
|
||||
* <dt>dsn<dd> datasource setting
|
||||
* <dt>tblNamePrefix <dd>prefix for table names in the database
|
||||
|
@ -38,6 +44,7 @@
|
|||
* <dt>bufferDir <dd>directory for temporary files
|
||||
* <dt>transDir <dd>directory for incomplete transferred files
|
||||
* <dt>accessDir <dd>directory for symlinks to accessed files
|
||||
* <dt>isArchive <dd>local/central flag
|
||||
* <dt>storageUrlPath<dd>path-URL-part of storageServer base dir
|
||||
* <dt>storageXMLRPC<dd>XMLRPC server script address relative to storageUrlPath
|
||||
* <dt>storageUrlHost, storageUrlPort<dd>host and port of storageServer
|
||||
|
@ -57,14 +64,13 @@ $config = array(
|
|||
),
|
||||
'tblNamePrefix' => 'ls_',
|
||||
'authCookieName'=> 'lssid',
|
||||
#'storageDir' => dirname(getcwd()).'/stor',
|
||||
#'bufferDir' => dirname(getcwd()).'/stor/buffer',
|
||||
#'transDir' => dirname(getcwd()).'/trans',
|
||||
#'accessDir' => dirname(getcwd()).'/access',
|
||||
'StationPrefsGr'=> 'StationPrefs',
|
||||
'AllGr' => 'All',
|
||||
'storageDir' => dirname(__FILE__).'/../../storageServer/var/stor',
|
||||
'bufferDir' => dirname(__FILE__).'/../../storageServer/var/stor/buffer',
|
||||
'transDir' => dirname(__FILE__).'/../../storageServer/var/trans',
|
||||
'accessDir' => dirname(__FILE__).'/../../storageServer/var/access',
|
||||
'isArchive' => FALSE,
|
||||
|
||||
/* ==================================================== URL configuration */
|
||||
'storageUrlPath' => '/livesupportStorageServer',
|
||||
|
@ -80,6 +86,13 @@ $config = array(
|
|||
'archiveAccountLogin' => 'root',
|
||||
'archiveAccountPass' => 'q',
|
||||
|
||||
/* ============================================== scheduler configuration */
|
||||
'schedulerUrlPath' => '',
|
||||
'schedulerXMLRPC' => 'RC2',
|
||||
'schedulerUrlHost' => 'localhost',
|
||||
'schedulerUrlPort' => 3344,
|
||||
|
||||
/* ==================================== aplication-specific configuration */
|
||||
'objtypes' => array(
|
||||
'RootNode' => array('Folder'),
|
||||
'Storage' => array('Folder', 'File', 'Replica'),
|
||||
|
@ -108,8 +121,6 @@ $config = array(
|
|||
);
|
||||
|
||||
|
||||
|
||||
|
||||
define('UI_HANDLER', 'ui_handler.php');
|
||||
define('UI_BROWSER', 'ui_browser.php');
|
||||
define('UI_FORM_STANDARD_METHOD', 'POST');
|
||||
|
|
|
@ -50,8 +50,7 @@
|
|||
}
|
||||
|
||||
#scratchpad {
|
||||
text-align: center;
|
||||
width: 300px;
|
||||
width: 400px;
|
||||
border-style : dotted;
|
||||
padding : 5px;
|
||||
margin-top: 10px;
|
||||
|
|
|
@ -12,6 +12,10 @@ if (is_array($_REQUEST['popup'])){
|
|||
$Smarty->display('popup/_close.tpl');
|
||||
break;
|
||||
|
||||
case "_clear_parent":
|
||||
$Smarty->display('popup/_clear_parent.tpl');
|
||||
break;
|
||||
|
||||
case "login":
|
||||
$Smarty->assign('login', $uiBrowser->login($Smarty, $ui_fmask));
|
||||
$Smarty->display('popup/login.tpl');
|
||||
|
@ -91,7 +95,7 @@ if ($uiBrowser->userid) {
|
|||
|
||||
case "SEARCH":
|
||||
if (is_array($uiBrowser->SEARCH->criteria) ){
|
||||
$Smarty->assign('searchres', $uiBrowser->SEARCH->results);
|
||||
$Smarty->assign('searchres', $uiBrowser->SEARCH->results);
|
||||
$Smarty->assign('showSearchRes', TRUE);
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php
|
||||
require dirname(__FILE__).'/../ui_handler_init.php';
|
||||
|
||||
switch($_REQUEST['act']){
|
||||
|
@ -137,7 +137,11 @@ switch($_REQUEST['act']){
|
|||
break;
|
||||
|
||||
case "SEARCH.clear":
|
||||
$uiHandler->SEARCH->clear($_REQUEST);
|
||||
$uiHandler->SEARCH->clear();
|
||||
break;
|
||||
|
||||
case "SEARCH.setOffset":
|
||||
$uiHandler->SEARCH->setOffset($_REQUEST['page']);
|
||||
break;
|
||||
|
||||
case "activatePL":
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!-- $Id: smarty-dynamic-fancygroup.tpl,v 1.1 2005/02/23 13:07:34 sebastian Exp $ -->
|
||||
<!-- $Id: smarty-dynamic-fancygroup.tpl,v 1.2 2005/02/23 22:57:14 sebastian Exp $ -->
|
||||
|
||||
<tr>
|
||||
<td valign="top" align="right">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!-- $Id: smarty-dynamic-green.tpl,v 1.1 2005/02/23 13:07:34 sebastian Exp $ -->
|
||||
<!-- $Id: smarty-dynamic-green.tpl,v 1.2 2005/02/23 22:57:14 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.1 2005/02/23 13:07:34 sebastian Exp $ -->
|
||||
<!-- $Id: smarty-dynamic.tpl,v 1.2 2005/02/23 22:57:14 sebastian Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<title>Smarty template for Array renderer</title>
|
||||
|
|
|
@ -10,44 +10,51 @@
|
|||
{if $GLOBALS.pid}<a href="{$UI_BROWSER}?act=fileBrowse&id={$GLOBALS.pid}">[go up]</a>{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{foreach from=$structure.listdata item=o}
|
||||
<tr bgcolor="{cycle values='#eeeeee, #dadada"'}">
|
||||
{foreach from=$structure.listdata item=i}
|
||||
<tr bgcolor="{cycle values='#eeeeee, #dadada"'}"
|
||||
onMouseOver="highlight()" onMouseOut="darklight()"
|
||||
onContextmenu="return menu('{$i.id}'
|
||||
{if $i.type == ('audioclip' || 'webstream')}
|
||||
,'PL.addItem', 'PL.newUsingItem', 'SP.addItem', 'delete'
|
||||
{/if}
|
||||
)"
|
||||
>
|
||||
<td align="center">
|
||||
<span id="ID{$o.id}">
|
||||
{if $o.type eq 'Folder'}
|
||||
<a href="{$UI_BROWSER}?act=fileBrowse&id={$o.id}" >[{$o.title}]</b>
|
||||
<span id="ID{$i.id}">
|
||||
{if $i.type eq 'Folder'}
|
||||
<a href="{$UI_BROWSER}?act=fileBrowse&id={$i.id}" >[{$i.title}]</b>
|
||||
{else}
|
||||
{$o.title}
|
||||
{$i.title}
|
||||
{/if}
|
||||
</span>
|
||||
</td>
|
||||
<td align="center">{$o.type}</td>
|
||||
<td align="center">{$i.type}</td>
|
||||
<td>
|
||||
<a href="javascript:frename('{$o.name}', '{$o.id}')">[rename]</a>
|
||||
<a href="javascript:fmove('{$o.id}', '.')">[move]</a>
|
||||
<a href="javascript:fcopy('{$o.id}', '.')">[copy]</a>
|
||||
<a href="{$UI_BROWSER}?act=permissions&id={$o.id}">[permissions]</a>
|
||||
<a href="javascript:frename('{$i.name}', '{$i.id}')">[rename]</a>
|
||||
<a href="javascript:fmove('{$i.id}', '.')">[move]</a>
|
||||
<a href="javascript:fcopy('{$i.id}', '.')">[copy]</a>
|
||||
<a href="{$UI_BROWSER}?act=permissions&id={$i.id}">[permissions]</a>
|
||||
<br>
|
||||
|
||||
{if ($delOverride eq $o.id)}
|
||||
<a href="{$UI_HANDLER}?act=delete&id={$o.id}&delOverride={$o.id}"
|
||||
onClick="return confirm('Really delete non empty Folder "{$o.name}" now?')">[DEL]</a>
|
||||
{if ($delOverride eq $i.id)}
|
||||
<a href="{$UI_HANDLER}?act=delete&id={$i.id}&delOverride={$i.id}"
|
||||
onClick="return confirm('Really delete non empty Folder "{$i.name}" now?')">[DEL]</a>
|
||||
{else}
|
||||
<a href="{$UI_HANDLER}?act=delete&id={$o.id}"
|
||||
onClick="return confirm('Delete "{$o.name}"?')">[DEL]</a>
|
||||
<a href="{$UI_HANDLER}?act=delete&id={$i.id}"
|
||||
onClick="return confirm('Delete "{$i.name}"?')">[DEL]</a>
|
||||
{/if}
|
||||
{if $o.type != 'Folder'}
|
||||
<a href="{$UI_BROWSER}?act=getFile&id={$o.id}">[Access]</a>
|
||||
<a href="{$UI_BROWSER}?act=getMData&id={$o.id}">[vMData]</a>
|
||||
<a href="{$UI_BROWSER}?act=_analyzeFile&id={$o.id}">[Analyze]</a>
|
||||
{if $i.type != 'Folder'}
|
||||
<a href="{$UI_BROWSER}?act=getFile&id={$i.id}">[Access]</a>
|
||||
<a href="{$UI_BROWSER}?act=getMData&id={$i.id}">[vMData]</a>
|
||||
<a href="{$UI_BROWSER}?act=_analyzeFile&id={$i.id}">[Analyze]</a>
|
||||
|
||||
{if $o.type eq 'webstream'}
|
||||
<a href="{$UI_BROWSER}?act=addWebstream&id={$o.id}&replace=1">[Replace]</a>
|
||||
{elseif $o.type eq 'audioclip'}
|
||||
<a href="{$UI_BROWSER}?act=uploadFile&id={$o.id}&replace=1">[Replace]</a>
|
||||
{if $i.type eq 'webstream'}
|
||||
<a href="{$UI_BROWSER}?act=addWebstream&id={$i.id}&replace=1">[Replace]</a>
|
||||
{elseif $i.type eq 'audioclip'}
|
||||
<a href="{$UI_BROWSER}?act=uploadFile&id={$i.id}&replace=1">[Replace]</a>
|
||||
{/if}
|
||||
<a href="{$UI_BROWSER}?act=editMetaData&id={$o.id}">[eMData]</a>
|
||||
<a href="#" onclick="hpopup('{$UI_HANDLER}?act=SP.addItem&id={$o.id}', '2SP')">[SP]</a>
|
||||
<a href="{$UI_BROWSER}?act=editMetaData&id={$i.id}">[eMData]</a>
|
||||
<a href="#" onclick="hpopup('{$UI_HANDLER}?act=SP.addItem&id={$i.id}', '2SP')">[SP]</a>
|
||||
{/if}
|
||||
|
||||
</td>
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
{include file="script/basics.js.tpl"}
|
||||
{include file="script/myKontextMenue.js.tpl"}
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
|
@ -9,7 +9,7 @@
|
|||
{/if}
|
||||
|
||||
{if $SCRATCHPAD}
|
||||
{include file="ScratchPad.tpl"}
|
||||
{include file="scratchPad.tpl"}
|
||||
{/if}
|
||||
|
||||
{if $structure}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<script type="text/javascript">
|
||||
opener.location.reload();
|
||||
//opener.location.href="{$UI_BROWSER}";
|
||||
</script>
|
||||
|
|
|
@ -5,39 +5,50 @@
|
|||
// Nur für IE 5+ und NN 6+
|
||||
ie5=(document.getElementById && document.all && document.styleSheets)?1:0;
|
||||
nn6=(document.getElementById && !document.all)?1:0;
|
||||
|
||||
function initMenu(id, type) {
|
||||
if (ie5 || nn6) {
|
||||
menuWidth = 0,
|
||||
menuHeight = 0;
|
||||
//menuStatus = 0;
|
||||
|
||||
sp2=" ";
|
||||
sp5=sp2+sp2+" "; // Leerzeichen als Abstandshalter (flexibler und code-sparender als eine aufwendige Tabellenkonstruktion)
|
||||
oF="onfocus='if(this.blur)this.blur()'"; // Um hässlichen Linkrahmen in einigen Browsern zu vermeiden
|
||||
|
||||
if (type == 'playlist')
|
||||
document.getElementById('menucontainer').innerHTML =
|
||||
"<div id='menu' style='position:absolute;top:-250;left:0;z-index:100'>"+
|
||||
"<table cellpadding='5' cellspacing='0' width='"+menuWidth+"' height='"+menuHeight+"' style='border-style:outset;border-width:1;border-color:#3a6c96;background-color:#4682B4'>"+
|
||||
"<tr><td><a class='menu' href=\"{/literal}javascript: hpopup('{$UI_HANDLER}?act=activatePL&id="+id+"', 'activatePL'){literal}\""+oF+"> Activate this Playlist </a></td></tr>"+
|
||||
"<tr><td><a class='menu' href=\"{/literal}{$UI_BROWSER}?act=PL.display&id="+id+"{literal}\""+oF+"> Display this Playlist </a></td></tr>"+
|
||||
"</table></div>";
|
||||
else
|
||||
document.getElementById('menucontainer').innerHTML =
|
||||
"<div id='menu' style='position:absolute;top:-250;left:0;z-index:100'>"+
|
||||
"<table cellpadding='5' cellspacing='0' width='"+menuWidth+"' height='"+menuHeight+"' style='border-style:outset;border-width:1;border-color:#3a6c96;background-color:#4682B4'>"+
|
||||
"<tr><td><a class='menu' href='#'"+oF+"> Add to Playlist </a></td></tr>"+
|
||||
"</table></div>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
menuStatus = 0;
|
||||
document.onmousedown = hideMenu;
|
||||
document.onmouseup = hideMenu;
|
||||
document.write('<div id="menucontainer"></div>');
|
||||
menuWidth = 0,
|
||||
menuHeight = 0;
|
||||
|
||||
function menu(id) {
|
||||
var menuHeader = "<div id='menu' style='position:absolute;top:-250;left:0;z-index:100'>"+
|
||||
"<table cellpadding='5' cellspacing='0' width='"+menuWidth+"' height='"+menuHeight+"' style='border-style:outset;border-width:1;border-color:#3a6c96;background-color:#4682B4'>";
|
||||
var menuFooter = "</table></div>";
|
||||
var menuHtml = '';
|
||||
var sp2 = " ";
|
||||
var sp5 = sp2+sp2+" "; // Leerzeichen als Abstandshalter (flexibler und code-sparender als eine aufwendige Tabellenkonstruktion) ;
|
||||
var oF = "onfocus='if(this.blur)this.blur()'"; // Um hässlichen Linkrahmen in einigen Browsern zu vermeiden;
|
||||
var entry = new Array();
|
||||
//menuStatus = 0;
|
||||
|
||||
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>";
|
||||
break;
|
||||
case "PL.newUsingItem":
|
||||
menuHtml = menuHtml + "<tr><td><a class='menu' href='#'"+oF+"> New Playlist using File </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>";
|
||||
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>";
|
||||
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>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
document.getElementById('menucontainer').innerHTML = menuHeader + menuHtml + menuFooter;
|
||||
|
||||
function contextmenu(id, type){
|
||||
initMenu(id, type);
|
||||
document.oncontextmenu = showMenu;
|
||||
return false;
|
||||
}
|
||||
|
@ -69,14 +80,24 @@ function hideMenu(e) {
|
|||
menuStatus=0;
|
||||
}
|
||||
}
|
||||
|
||||
var passed=false;
|
||||
function highlight()
|
||||
{
|
||||
//if (!passed) alert('try rightclick in lists...');
|
||||
passed = true;
|
||||
}
|
||||
|
||||
function darklight()
|
||||
{
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style type='text/css'>
|
||||
<style type="text/css">
|
||||
a.menu {text-decoration:none;font-family:Verdana,Arial;font-size:80%}
|
||||
a.menu:link,a.menu:visited {text-decoration:none;color:#F0F8FF}
|
||||
a.menu:hover,a.menu:active {text-decoration:none;background-color:#F0F8FF;color:#000040}
|
||||
hr.menu {border:0px;height:1px;background-color:#B0C4DE;color:#B0C4DE}
|
||||
</style>
|
||||
|
||||
<div id="menucontainer"></div>
|
||||
{/literal}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div id="searchres">
|
||||
<center>
|
||||
|
||||
{if is_array($searchres)}
|
||||
{if $searchres.count > 0}
|
||||
<table border="0" width="50%">
|
||||
<tr style="background-color: {cycle values='#eeeeee, #dadada'}">
|
||||
<td align="center"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SEARCH.reOrder&by=title', 'order');">{tra 0=Title}</a></td>
|
||||
|
@ -11,20 +11,43 @@
|
|||
<td align="center"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SEARCH.reOrder&by=extent', 'order');">{tra 0=Duration}</a></td>
|
||||
<td align="center"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SEARCH.reOrder&by=type', 'order');">{tra 0=Type}</a></td>
|
||||
</tr>
|
||||
{foreach from=$searchres item=s}
|
||||
<tr style="background-color: {cycle values='#eeeeee, #dadada'}">
|
||||
<td align="center">{$s.title}</td>
|
||||
<td align="center">{$s.creator}</td>
|
||||
<td align="center">{$s.duration}</td>
|
||||
<td align="center">{$s.type}</td>
|
||||
{foreach from=$searchres.items item=i}
|
||||
<tr style="background-color: {cycle values='#eeeeee, #dadada'}"
|
||||
onMouseOver="highlight()" onMouseOut="darklight()"
|
||||
onContextmenu="return menu('{$i.id}'
|
||||
{if $i.type == ('audioclip' || 'webstream')}
|
||||
,'PL.addItem', 'PL.newUsingItem', 'SP.addItem'
|
||||
{/if}
|
||||
)"
|
||||
>
|
||||
<td align="center">{$i.title}</td>
|
||||
<td align="center">{$i.creator}</td>
|
||||
<td align="center">{$i.duration}</td>
|
||||
<td align="center">{$i.type}</td>
|
||||
<!--
|
||||
<td>
|
||||
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=PL.addItem&id={$s.id}', '2PL')">[PL]</a>
|
||||
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SP.addItem&id={$s.id}', '2SP')">[SP]</a>
|
||||
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=PL.addItem&id={$i.id}', '2PL')">[PL]</a>
|
||||
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SP.addItem&id={$i.id}', '2SP')">[SP]</a>
|
||||
</td>
|
||||
-->
|
||||
</tr>
|
||||
{/foreach}
|
||||
<tr>
|
||||
<td>
|
||||
{if $searchres.prev}<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SEARCH.setOffset&page=prev', 'pager')">back</a>{/if}
|
||||
</td>
|
||||
<td>count: {$searchres.count}</td>
|
||||
<td>
|
||||
go:
|
||||
{foreach from=$searchres.pages item=p key=k}
|
||||
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SEARCH.setOffset&page={$k}', 'pager')">{$p}</a>
|
||||
{/foreach}
|
||||
</td>
|
||||
<td align="right">
|
||||
{if $searchres.next}<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SEARCH.setOffset&page=next', 'pager')">forward</a>{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="4">
|
||||
</table>
|
||||
{else}
|
||||
No match found.
|
||||
|
|
|
@ -230,19 +230,21 @@ class uiBase
|
|||
{
|
||||
$ia = $this->gb->analyzeFile($id, $this->sessid);
|
||||
$s = $ia['playtime_seconds'];
|
||||
$extent = date('H:i:s', floor($s)-date('Z')).substr(number_format($s, 6), strpos(number_format($s, 6), '.'));
|
||||
|
||||
if ($format=='array') {
|
||||
return array(
|
||||
'Format.Extent' => date('H:i:s', round($s)-date('Z')).substr(number_format($s, 6), strpos(number_format($s, 6), '.')),
|
||||
'Format.Extent' => $extent,
|
||||
'Format.Medium.Bitrate' => $ia['audio']['bitrate'],
|
||||
'Format.Medium.Channels' => $ia['audio']['channelmode'],
|
||||
'Format.Medium.Samplerate' => $ia['audio']['sample_rate'],
|
||||
'Format.Medium.Encoder' => $ia['audio']['codec'] ? $ia['audio']['codec'] : $ia['audio']['encoder'],
|
||||
);
|
||||
} elseif ($format=='text') {
|
||||
#print_r($ia);
|
||||
return "fileformat: {$ia['fileformat']}<br>
|
||||
seconds: {$ia['playtime_seconds']}<br>
|
||||
length: ".date('H:i:s', round($s)-date('Z')).substr(number_format($s, 6), strpos(number_format($s, 6), '.'))."<br>
|
||||
length: $extent<br>
|
||||
channels: {$ia['audio']['channels']}<br>
|
||||
sample_rate: {$ia['audio']['sample_rate']}<br>
|
||||
bits_per_sample: {$ia['audio']['bits_per_sample']}<br>
|
||||
|
|
|
@ -38,12 +38,14 @@ class uiHandler extends uiBase {
|
|||
*/
|
||||
function login(&$formdata, &$mask)
|
||||
{
|
||||
session_destroy();
|
||||
session_start();
|
||||
if ($this->_validateForm($formdata, $mask)) {
|
||||
$sessid = $this->gb->login($formdata['login'], $formdata['pass']);
|
||||
if($sessid && !PEAR::isError($sessid)){
|
||||
setcookie($this->config['authCookieName'], $sessid);
|
||||
$id = $this->gb->getObjId($formdata['login'], $this->gb->storId);
|
||||
if(!PEAR::isError($id)) $this->redirUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
|
||||
if(!PEAR::isError($id)) $this->redirUrl = UI_BROWSER.'?popup[]=_clear_parent&popup[]=_close';
|
||||
}else{
|
||||
$this->_retMsg('Login failed.');
|
||||
$_SESSION['retransferFormData']['login']=$formdata['login'];
|
||||
|
@ -67,8 +69,8 @@ class uiHandler extends uiBase {
|
|||
session_destroy();
|
||||
|
||||
if ($trigger_login)
|
||||
$this->redirUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=login';
|
||||
else $this->redirUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
|
||||
$this->redirUrl = UI_BROWSER.'?popup[]=_clear_parent&popup[]=login';
|
||||
else $this->redirUrl = UI_BROWSER.'?popup[]=_clear_parent&popup[]=_close';
|
||||
}
|
||||
|
||||
// --- files ---
|
||||
|
|
|
@ -7,6 +7,7 @@ class uiSearch
|
|||
$this->results =& $_SESSION[UI_SEARCH_SESSNAME]['results'];
|
||||
$this->criteria =& $_SESSION[UI_SEARCH_SESSNAME]['criteria'];
|
||||
$this->reloadUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
|
||||
$this->criteria['limit'] = 3;
|
||||
}
|
||||
|
||||
function setReload()
|
||||
|
@ -54,8 +55,9 @@ class uiSearch
|
|||
|
||||
function newsearch(&$formdata)
|
||||
{
|
||||
$this->results = NULL;
|
||||
$this->criteria = NULL;
|
||||
$this->results = NULL;
|
||||
$this->criteria['conditions'] = NULL;
|
||||
$this->criteria['offset'] = NULL;
|
||||
|
||||
$this->criteria['operator'] = $formdata['operator'];
|
||||
$this->criteria['filetype'] = $formdata['filetype'];
|
||||
|
@ -66,10 +68,10 @@ class uiSearch
|
|||
if (is_array($val) && strlen($val[2])) {
|
||||
$this->criteria['conditions'][$key] = array('cat' => $this->Base->_formElementDecode($val[0]),
|
||||
'op' => $val[1],
|
||||
'val' => $val[2]);
|
||||
'val' => stripslashes($val[2]));
|
||||
$this->criteria['form'][$key] = array(0 => $this->Base->_formElementDecode($val[0]),
|
||||
1 => $val[1],
|
||||
2 => $val[2]);
|
||||
2 => stripslashes($val[2]));
|
||||
}
|
||||
}
|
||||
$this->Base->redirUrl = UI_BROWSER.'?act=SEARCH';
|
||||
|
@ -78,20 +80,29 @@ class uiSearch
|
|||
|
||||
function searchDB()
|
||||
{
|
||||
$this->results = NULL;
|
||||
#print_r($this->criteria);
|
||||
$results = $this->Base->gb->localSearch($this->criteria, $this->Base->sessid);
|
||||
foreach ($results['results'] as $rec) {
|
||||
$this->results[] = $this->Base->_getMetaInfo($this->Base->gb->_idFromGunid($rec));
|
||||
$this->results['items'][] = $this->Base->_getMetaInfo($this->Base->gb->_idFromGunid($rec));
|
||||
}
|
||||
$this->results['count'] = $results['cnt'];
|
||||
$this->results['next'] = $results['cnt'] > $this->criteria['offset'] + $this->criteria['limit'] ? TRUE : FALSE;
|
||||
$this->results['prev'] = $this->criteria['offset'] > 0 ? TRUE : FALSE;
|
||||
for ($n = 0; $n < (ceil($results['cnt'] / $this->criteria['limit'])); $n++) {
|
||||
$this->results['pages'][$n] = $n+1;
|
||||
}
|
||||
}
|
||||
|
||||
function reOrder($by)
|
||||
{
|
||||
$this->results = NULL;
|
||||
$this->criteria['offset'] = NULL;
|
||||
|
||||
if ($this->criteria['orderby'] == $by && !$this->criteria['desc'])
|
||||
$this->criteria['desc'] = TRUE;
|
||||
else
|
||||
$this->criteria['desc'] = FALSE;
|
||||
|
||||
$this->criteria['orderby'] = $by;
|
||||
$this->setReload();
|
||||
$this->searchDB();
|
||||
|
@ -101,8 +112,24 @@ class uiSearch
|
|||
function clear()
|
||||
{
|
||||
#$this->results = NULL;
|
||||
$this->criteria['form'] = NULL;
|
||||
$this->criteria['form'] = NULL;
|
||||
$this->setReload();
|
||||
}
|
||||
|
||||
function setOffset($page)
|
||||
{
|
||||
$o =& $this->criteria['offset'];
|
||||
$l =& $this->criteria['limit'];
|
||||
|
||||
if ($page == 'next') {
|
||||
$o += $l;
|
||||
} elseif ($page == 'prev') {
|
||||
$o -= $l;
|
||||
} elseif (is_numeric($page)) {
|
||||
$o = $l * $page;
|
||||
}
|
||||
$this->setReload();
|
||||
$this->searchDB();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue