*** empty log message ***

This commit is contained in:
sebastian 2005-02-23 22:57:14 +00:00
parent cc2a640933
commit 5fc8fb9d42
20 changed files with 201 additions and 103 deletions

View File

@ -2979,7 +2979,7 @@
* libs/Smarty.class.php * libs/Smarty.class.php
libs/Smarty_Compiler.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> 2003-03-31 Messju Mohr <messju@lammfellpuschen.de>

View File

@ -25,7 +25,7 @@
* @package Smarty * @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 * Config file reading class

View File

@ -30,7 +30,7 @@
* @version 2.6.6 * @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 * DIR_SEP isn't used anymore, but third party apps might

View File

@ -26,7 +26,7 @@
* @package Smarty * @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 * Template compiling class

View File

@ -23,13 +23,19 @@
Author : $Author: sebastian $ 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 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/htmlUI/var/Attic/conf.php,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
/**
* \file conf.php
* storageServer configuration file
*/
/** /**
* configuration structure: * configuration structure:
*
* <dl> * <dl>
* <dt>dsn<dd> datasource setting * <dt>dsn<dd> datasource setting
* <dt>tblNamePrefix <dd>prefix for table names in the database * <dt>tblNamePrefix <dd>prefix for table names in the database
@ -38,6 +44,7 @@
* <dt>bufferDir <dd>directory for temporary files * <dt>bufferDir <dd>directory for temporary files
* <dt>transDir <dd>directory for incomplete transferred files * <dt>transDir <dd>directory for incomplete transferred files
* <dt>accessDir <dd>directory for symlinks to accessed 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>storageUrlPath<dd>path-URL-part of storageServer base dir
* <dt>storageXMLRPC<dd>XMLRPC server script address relative to storageUrlPath * <dt>storageXMLRPC<dd>XMLRPC server script address relative to storageUrlPath
* <dt>storageUrlHost, storageUrlPort<dd>host and port of storageServer * <dt>storageUrlHost, storageUrlPort<dd>host and port of storageServer
@ -57,14 +64,13 @@ $config = array(
), ),
'tblNamePrefix' => 'ls_', 'tblNamePrefix' => 'ls_',
'authCookieName'=> 'lssid', 'authCookieName'=> 'lssid',
#'storageDir' => dirname(getcwd()).'/stor', 'StationPrefsGr'=> 'StationPrefs',
#'bufferDir' => dirname(getcwd()).'/stor/buffer', 'AllGr' => 'All',
#'transDir' => dirname(getcwd()).'/trans',
#'accessDir' => dirname(getcwd()).'/access',
'storageDir' => dirname(__FILE__).'/../../storageServer/var/stor', 'storageDir' => dirname(__FILE__).'/../../storageServer/var/stor',
'bufferDir' => dirname(__FILE__).'/../../storageServer/var/stor/buffer', 'bufferDir' => dirname(__FILE__).'/../../storageServer/var/stor/buffer',
'transDir' => dirname(__FILE__).'/../../storageServer/var/trans', 'transDir' => dirname(__FILE__).'/../../storageServer/var/trans',
'accessDir' => dirname(__FILE__).'/../../storageServer/var/access', 'accessDir' => dirname(__FILE__).'/../../storageServer/var/access',
'isArchive' => FALSE,
/* ==================================================== URL configuration */ /* ==================================================== URL configuration */
'storageUrlPath' => '/livesupportStorageServer', 'storageUrlPath' => '/livesupportStorageServer',
@ -80,6 +86,13 @@ $config = array(
'archiveAccountLogin' => 'root', 'archiveAccountLogin' => 'root',
'archiveAccountPass' => 'q', 'archiveAccountPass' => 'q',
/* ============================================== scheduler configuration */
'schedulerUrlPath' => '',
'schedulerXMLRPC' => 'RC2',
'schedulerUrlHost' => 'localhost',
'schedulerUrlPort' => 3344,
/* ==================================== aplication-specific configuration */
'objtypes' => array( 'objtypes' => array(
'RootNode' => array('Folder'), 'RootNode' => array('Folder'),
'Storage' => array('Folder', 'File', 'Replica'), 'Storage' => array('Folder', 'File', 'Replica'),
@ -108,8 +121,6 @@ $config = array(
); );
define('UI_HANDLER', 'ui_handler.php'); define('UI_HANDLER', 'ui_handler.php');
define('UI_BROWSER', 'ui_browser.php'); define('UI_BROWSER', 'ui_browser.php');
define('UI_FORM_STANDARD_METHOD', 'POST'); define('UI_FORM_STANDARD_METHOD', 'POST');

View File

@ -50,8 +50,7 @@
} }
#scratchpad { #scratchpad {
text-align: center; width: 400px;
width: 300px;
border-style : dotted; border-style : dotted;
padding : 5px; padding : 5px;
margin-top: 10px; margin-top: 10px;

View File

@ -12,6 +12,10 @@ if (is_array($_REQUEST['popup'])){
$Smarty->display('popup/_close.tpl'); $Smarty->display('popup/_close.tpl');
break; break;
case "_clear_parent":
$Smarty->display('popup/_clear_parent.tpl');
break;
case "login": case "login":
$Smarty->assign('login', $uiBrowser->login($Smarty, $ui_fmask)); $Smarty->assign('login', $uiBrowser->login($Smarty, $ui_fmask));
$Smarty->display('popup/login.tpl'); $Smarty->display('popup/login.tpl');
@ -91,7 +95,7 @@ if ($uiBrowser->userid) {
case "SEARCH": case "SEARCH":
if (is_array($uiBrowser->SEARCH->criteria) ){ if (is_array($uiBrowser->SEARCH->criteria) ){
$Smarty->assign('searchres', $uiBrowser->SEARCH->results); $Smarty->assign('searchres', $uiBrowser->SEARCH->results);
$Smarty->assign('showSearchRes', TRUE); $Smarty->assign('showSearchRes', TRUE);
}; };

View File

@ -1,4 +1,4 @@
<?php <?php
require dirname(__FILE__).'/../ui_handler_init.php'; require dirname(__FILE__).'/../ui_handler_init.php';
switch($_REQUEST['act']){ switch($_REQUEST['act']){
@ -137,7 +137,11 @@ switch($_REQUEST['act']){
break; break;
case "SEARCH.clear": case "SEARCH.clear":
$uiHandler->SEARCH->clear($_REQUEST); $uiHandler->SEARCH->clear();
break;
case "SEARCH.setOffset":
$uiHandler->SEARCH->setOffset($_REQUEST['page']);
break; break;
case "activatePL": case "activatePL":

View File

@ -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> <tr>
<td valign="top" align="right"> <td valign="top" align="right">

View File

@ -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> <tr>
<td align="right" valign="top" class="green"><b>{$element.label}:</b></td> <td align="right" valign="top" class="green"><b>{$element.label}:</b></td>

View File

@ -1,5 +1,5 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!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> <html>
<head> <head>
<title>Smarty template for Array renderer</title> <title>Smarty template for Array renderer</title>

View File

@ -10,44 +10,51 @@
{if $GLOBALS.pid}<a href="{$UI_BROWSER}?act=fileBrowse&id={$GLOBALS.pid}">[go up]</a>{/if} {if $GLOBALS.pid}<a href="{$UI_BROWSER}?act=fileBrowse&id={$GLOBALS.pid}">[go up]</a>{/if}
</td> </td>
</tr> </tr>
{foreach from=$structure.listdata item=o} {foreach from=$structure.listdata item=i}
<tr bgcolor="{cycle values='#eeeeee, #dadada"'}"> <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"> <td align="center">
<span id="ID{$o.id}"> <span id="ID{$i.id}">
{if $o.type eq 'Folder'} {if $i.type eq 'Folder'}
<a href="{$UI_BROWSER}?act=fileBrowse&id={$o.id}" >[{$o.title}]</b> <a href="{$UI_BROWSER}?act=fileBrowse&id={$i.id}" >[{$i.title}]</b>
{else} {else}
{$o.title} {$i.title}
{/if} {/if}
</span> </span>
</td> </td>
<td align="center">{$o.type}</td> <td align="center">{$i.type}</td>
<td> <td>
&nbsp;<a href="javascript:frename('{$o.name}', '{$o.id}')">[rename]</a> &nbsp;<a href="javascript:frename('{$i.name}', '{$i.id}')">[rename]</a>
&nbsp;<a href="javascript:fmove('{$o.id}', '.')">[move]</a> &nbsp;<a href="javascript:fmove('{$i.id}', '.')">[move]</a>
&nbsp;<a href="javascript:fcopy('{$o.id}', '.')">[copy]</a> &nbsp;<a href="javascript:fcopy('{$i.id}', '.')">[copy]</a>
&nbsp;<a href="{$UI_BROWSER}?act=permissions&id={$o.id}">[permissions]</a> &nbsp;<a href="{$UI_BROWSER}?act=permissions&id={$i.id}">[permissions]</a>
<br> <br>
&nbsp; &nbsp;
{if ($delOverride eq $o.id)} {if ($delOverride eq $i.id)}
<a href="{$UI_HANDLER}?act=delete&id={$o.id}&delOverride={$o.id}" <a href="{$UI_HANDLER}?act=delete&id={$i.id}&delOverride={$i.id}"
onClick="return confirm('Really delete non empty Folder &quot;{$o.name}&quot; now?')">[DEL]</a> onClick="return confirm('Really delete non empty Folder &quot;{$i.name}&quot; now?')">[DEL]</a>
{else} {else}
<a href="{$UI_HANDLER}?act=delete&id={$o.id}" <a href="{$UI_HANDLER}?act=delete&id={$i.id}"
onClick="return confirm('Delete &quot;{$o.name}&quot;?')">[DEL]</a> onClick="return confirm('Delete &quot;{$i.name}&quot;?')">[DEL]</a>
{/if} {/if}
{if $o.type != 'Folder'} {if $i.type != 'Folder'}
&nbsp;<a href="{$UI_BROWSER}?act=getFile&id={$o.id}">[Access]</a> &nbsp;<a href="{$UI_BROWSER}?act=getFile&id={$i.id}">[Access]</a>
&nbsp;<a href="{$UI_BROWSER}?act=getMData&id={$o.id}">[vMData]</a> &nbsp;<a href="{$UI_BROWSER}?act=getMData&id={$i.id}">[vMData]</a>
&nbsp;<a href="{$UI_BROWSER}?act=_analyzeFile&id={$o.id}">[Analyze]</a> &nbsp;<a href="{$UI_BROWSER}?act=_analyzeFile&id={$i.id}">[Analyze]</a>
&nbsp; &nbsp;
{if $o.type eq 'webstream'} {if $i.type eq 'webstream'}
<a href="{$UI_BROWSER}?act=addWebstream&id={$o.id}&replace=1">[Replace]</a> <a href="{$UI_BROWSER}?act=addWebstream&id={$i.id}&replace=1">[Replace]</a>
{elseif $o.type eq 'audioclip'} {elseif $i.type eq 'audioclip'}
<a href="{$UI_BROWSER}?act=uploadFile&id={$o.id}&replace=1">[Replace]</a> <a href="{$UI_BROWSER}?act=uploadFile&id={$i.id}&replace=1">[Replace]</a>
{/if} {/if}
&nbsp;<a href="{$UI_BROWSER}?act=editMetaData&id={$o.id}">[eMData]</a> &nbsp;<a href="{$UI_BROWSER}?act=editMetaData&id={$i.id}">[eMData]</a>
&nbsp;<a href="#" onclick="hpopup('{$UI_HANDLER}?act=SP.addItem&id={$o.id}', '2SP')">[SP]</a> &nbsp;<a href="#" onclick="hpopup('{$UI_HANDLER}?act=SP.addItem&id={$i.id}', '2SP')">[SP]</a>
{/if} {/if}
&nbsp; &nbsp;
</td> </td>

View File

@ -6,7 +6,6 @@
{include file="script/basics.js.tpl"} {include file="script/basics.js.tpl"}
{include file="script/myKontextMenue.js.tpl"} {include file="script/myKontextMenue.js.tpl"}
</head> </head>
<body> <body>

View File

@ -9,7 +9,7 @@
{/if} {/if}
{if $SCRATCHPAD} {if $SCRATCHPAD}
{include file="ScratchPad.tpl"} {include file="scratchPad.tpl"}
{/if} {/if}
{if $structure} {if $structure}

View File

@ -1,4 +1,3 @@
<script type="text/javascript"> <script type="text/javascript">
opener.location.reload(); opener.location.reload();
//opener.location.href="{$UI_BROWSER}";
</script> </script>

View File

@ -5,39 +5,50 @@
// Nur für IE 5+ und NN 6+ // Nur für IE 5+ und NN 6+
ie5=(document.getElementById && document.all && document.styleSheets)?1:0; ie5=(document.getElementById && document.all && document.styleSheets)?1:0;
nn6=(document.getElementById && !document.all)?1:0; nn6=(document.getElementById && !document.all)?1:0;
function initMenu(id, type) {
if (ie5 || nn6) {
menuWidth = 0,
menuHeight = 0;
//menuStatus = 0;
sp2="&nbsp;&nbsp;";
sp5=sp2+sp2+"&nbsp;"; // 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+">&nbsp; Activate this Playlist &nbsp;</a></td></tr>"+
"<tr><td><a class='menu' href=\"{/literal}{$UI_BROWSER}?act=PL.display&id="+id+"{literal}\""+oF+">&nbsp; Display this Playlist &nbsp;</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+">&nbsp; Add to Playlist &nbsp;</a></td></tr>"+
"</table></div>";
}
}
menuStatus = 0; 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 = "&nbsp;&nbsp;";
var sp5 = sp2+sp2+"&nbsp;"; // 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+">&nbsp; Activate this Playlist &nbsp;</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+">&nbsp; Display this Playlist &nbsp;</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+">&nbsp; Add File to Playlist &nbsp;</a></td></tr>";
break;
case "PL.newUsingItem":
menuHtml = menuHtml + "<tr><td><a class='menu' href='#'"+oF+">&nbsp; New Playlist using File &nbsp;</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+">&nbsp; Add File to ScratchPad &nbsp;</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+">&nbsp; Remove &nbsp;</a></td></tr>";
break;
case "delete":
menuHtml = menuHtml + "<tr><td><a class='menu' href='{/literal}{$UI_HANDLER}{literal}?act=delete&id="+id+"'"+oF+">&nbsp; !Delete File! &nbsp;</a></td></tr>";
break;
}
}
document.getElementById('menucontainer').innerHTML = menuHeader + menuHtml + menuFooter;
function contextmenu(id, type){
initMenu(id, type);
document.oncontextmenu = showMenu; document.oncontextmenu = showMenu;
return false; return false;
} }
@ -69,14 +80,24 @@ function hideMenu(e) {
menuStatus=0; menuStatus=0;
} }
} }
var passed=false;
function highlight()
{
//if (!passed) alert('try rightclick in lists...');
passed = true;
}
function darklight()
{
}
</script> </script>
<style type='text/css'> <style type="text/css">
a.menu {text-decoration:none;font-family:Verdana,Arial;font-size:80%} 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:link,a.menu:visited {text-decoration:none;color:#F0F8FF}
a.menu:hover,a.menu:active {text-decoration:none;background-color:#F0F8FF;color:#000040} 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} hr.menu {border:0px;height:1px;background-color:#B0C4DE;color:#B0C4DE}
</style> </style>
<div id="menucontainer"></div>
{/literal} {/literal}

View File

@ -3,7 +3,7 @@
<div id="searchres"> <div id="searchres">
<center> <center>
{if is_array($searchres)} {if $searchres.count > 0}
<table border="0" width="50%"> <table border="0" width="50%">
<tr style="background-color: {cycle values='#eeeeee, #dadada'}"> <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> <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=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> <td align="center"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SEARCH.reOrder&by=type', 'order');">{tra 0=Type}</a></td>
</tr> </tr>
{foreach from=$searchres item=s} {foreach from=$searchres.items item=i}
<tr style="background-color: {cycle values='#eeeeee, #dadada'}"> <tr style="background-color: {cycle values='#eeeeee, #dadada'}"
<td align="center">{$s.title}</td> onMouseOver="highlight()" onMouseOut="darklight()"
<td align="center">{$s.creator}</td> onContextmenu="return menu('{$i.id}'
<td align="center">{$s.duration}</td> {if $i.type == ('audioclip' || 'webstream')}
<td align="center">{$s.type}</td> ,'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> <td>
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=PL.addItem&id={$s.id}', '2PL')">[PL]</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={$s.id}', '2SP')">[SP]</a> <a href="#" onClick="hpopup('{$UI_HANDLER}?act=SP.addItem&id={$i.id}', '2SP')">[SP]</a>
</td> </td>
--> -->
</tr> </tr>
{/foreach} {/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> </table>
{else} {else}
No match found. No match found.

View File

@ -230,19 +230,21 @@ class uiBase
{ {
$ia = $this->gb->analyzeFile($id, $this->sessid); $ia = $this->gb->analyzeFile($id, $this->sessid);
$s = $ia['playtime_seconds']; $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') { if ($format=='array') {
return 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.Bitrate' => $ia['audio']['bitrate'],
'Format.Medium.Channels' => $ia['audio']['channelmode'], 'Format.Medium.Channels' => $ia['audio']['channelmode'],
'Format.Medium.Samplerate' => $ia['audio']['sample_rate'], 'Format.Medium.Samplerate' => $ia['audio']['sample_rate'],
'Format.Medium.Encoder' => $ia['audio']['codec'] ? $ia['audio']['codec'] : $ia['audio']['encoder'], 'Format.Medium.Encoder' => $ia['audio']['codec'] ? $ia['audio']['codec'] : $ia['audio']['encoder'],
); );
} elseif ($format=='text') { } elseif ($format=='text') {
#print_r($ia);
return "fileformat: {$ia['fileformat']}<br> return "fileformat: {$ia['fileformat']}<br>
seconds: {$ia['playtime_seconds']}<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> channels: {$ia['audio']['channels']}<br>
sample_rate: {$ia['audio']['sample_rate']}<br> sample_rate: {$ia['audio']['sample_rate']}<br>
bits_per_sample: {$ia['audio']['bits_per_sample']}<br> bits_per_sample: {$ia['audio']['bits_per_sample']}<br>

View File

@ -38,12 +38,14 @@ class uiHandler extends uiBase {
*/ */
function login(&$formdata, &$mask) function login(&$formdata, &$mask)
{ {
session_destroy();
session_start();
if ($this->_validateForm($formdata, $mask)) { if ($this->_validateForm($formdata, $mask)) {
$sessid = $this->gb->login($formdata['login'], $formdata['pass']); $sessid = $this->gb->login($formdata['login'], $formdata['pass']);
if($sessid && !PEAR::isError($sessid)){ if($sessid && !PEAR::isError($sessid)){
setcookie($this->config['authCookieName'], $sessid); setcookie($this->config['authCookieName'], $sessid);
$id = $this->gb->getObjId($formdata['login'], $this->gb->storId); $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{ }else{
$this->_retMsg('Login failed.'); $this->_retMsg('Login failed.');
$_SESSION['retransferFormData']['login']=$formdata['login']; $_SESSION['retransferFormData']['login']=$formdata['login'];
@ -67,8 +69,8 @@ class uiHandler extends uiBase {
session_destroy(); session_destroy();
if ($trigger_login) if ($trigger_login)
$this->redirUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=login'; $this->redirUrl = UI_BROWSER.'?popup[]=_clear_parent&popup[]=login';
else $this->redirUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close'; else $this->redirUrl = UI_BROWSER.'?popup[]=_clear_parent&popup[]=_close';
} }
// --- files --- // --- files ---

View File

@ -7,6 +7,7 @@ class uiSearch
$this->results =& $_SESSION[UI_SEARCH_SESSNAME]['results']; $this->results =& $_SESSION[UI_SEARCH_SESSNAME]['results'];
$this->criteria =& $_SESSION[UI_SEARCH_SESSNAME]['criteria']; $this->criteria =& $_SESSION[UI_SEARCH_SESSNAME]['criteria'];
$this->reloadUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close'; $this->reloadUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
$this->criteria['limit'] = 3;
} }
function setReload() function setReload()
@ -54,8 +55,9 @@ class uiSearch
function newsearch(&$formdata) function newsearch(&$formdata)
{ {
$this->results = NULL; $this->results = NULL;
$this->criteria = NULL; $this->criteria['conditions'] = NULL;
$this->criteria['offset'] = NULL;
$this->criteria['operator'] = $formdata['operator']; $this->criteria['operator'] = $formdata['operator'];
$this->criteria['filetype'] = $formdata['filetype']; $this->criteria['filetype'] = $formdata['filetype'];
@ -66,10 +68,10 @@ class uiSearch
if (is_array($val) && strlen($val[2])) { if (is_array($val) && strlen($val[2])) {
$this->criteria['conditions'][$key] = array('cat' => $this->Base->_formElementDecode($val[0]), $this->criteria['conditions'][$key] = array('cat' => $this->Base->_formElementDecode($val[0]),
'op' => $val[1], 'op' => $val[1],
'val' => $val[2]); 'val' => stripslashes($val[2]));
$this->criteria['form'][$key] = array(0 => $this->Base->_formElementDecode($val[0]), $this->criteria['form'][$key] = array(0 => $this->Base->_formElementDecode($val[0]),
1 => $val[1], 1 => $val[1],
2 => $val[2]); 2 => stripslashes($val[2]));
} }
} }
$this->Base->redirUrl = UI_BROWSER.'?act=SEARCH'; $this->Base->redirUrl = UI_BROWSER.'?act=SEARCH';
@ -78,20 +80,29 @@ class uiSearch
function searchDB() function searchDB()
{ {
$this->results = NULL;
#print_r($this->criteria); #print_r($this->criteria);
$results = $this->Base->gb->localSearch($this->criteria, $this->Base->sessid); $results = $this->Base->gb->localSearch($this->criteria, $this->Base->sessid);
foreach ($results['results'] as $rec) { 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) function reOrder($by)
{ {
$this->results = NULL; $this->criteria['offset'] = NULL;
if ($this->criteria['orderby'] == $by && !$this->criteria['desc']) if ($this->criteria['orderby'] == $by && !$this->criteria['desc'])
$this->criteria['desc'] = TRUE; $this->criteria['desc'] = TRUE;
else else
$this->criteria['desc'] = FALSE; $this->criteria['desc'] = FALSE;
$this->criteria['orderby'] = $by; $this->criteria['orderby'] = $by;
$this->setReload(); $this->setReload();
$this->searchDB(); $this->searchDB();
@ -101,8 +112,24 @@ class uiSearch
function clear() function clear()
{ {
#$this->results = NULL; #$this->results = NULL;
$this->criteria['form'] = NULL; $this->criteria['form'] = NULL;
$this->setReload(); $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();
}
} }
?> ?>