cleared tabs on file-/stream-upload
improved test for streams
This commit is contained in:
parent
64a9cca523
commit
d30d0e1423
13 changed files with 1184 additions and 1225 deletions
|
@ -100,6 +100,10 @@ if (is_array($_REQUEST['popup'])){
|
|||
$Smarty->assign('data', $uiBrowser->testStream($_REQUEST['url']));
|
||||
$Smarty->display('popup/testStream.tpl');
|
||||
break;
|
||||
|
||||
case "help":
|
||||
$Smarty->display('popup/help.tpl');
|
||||
break;
|
||||
}
|
||||
}
|
||||
die();
|
||||
|
|
|
@ -263,7 +263,7 @@ switch($_REQUEST['act']){
|
|||
break;
|
||||
|
||||
default:
|
||||
if ($uiHandler->userid) $uiHandler->_retMsg("Unknown method: $1", $_REQUEST["act"]);
|
||||
if ($uiHandler->userid) $uiHandler->_retMsg("Unknown method: $1.\\nSee Help for more information.", $_REQUEST["act"]);
|
||||
$uiHandler->redirUrl = UI_BROWSER;
|
||||
if ($_REQUEST['is_popup'])
|
||||
$uiHandler->redirUrl .= '?popup[]=_reload_parent&popup[]=_close';
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,7 @@
|
|||
<div class="content">
|
||||
{if $_REQUEST.act == addFileMData || $_REQUEST.act == addWebstreamMData || $_REQUEST.act == editItem}
|
||||
{include file="file/tabswitch.tpl"}
|
||||
{/if}
|
||||
<div class="container_elements" style="width: 607px;">
|
||||
<h1>
|
||||
{if $_REQUEST.act == addFileData || $_REQUEST.act == addFileMData || $_REQUEST.act == addWebstreamData || $_REQUEST.act == addWebstreamMData}
|
||||
|
@ -34,11 +37,6 @@
|
|||
<div id="div_MData">
|
||||
{include file="file/metadataform.tpl"}
|
||||
</div>
|
||||
|
||||
{if $editItem.id}
|
||||
<input type="button" class="button" onClick="showData()" value="##Stream Data##">
|
||||
<input type="button" class="button" onClick="showMData()" value="##Description##">
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if $editItem.type == 'playlist'}
|
||||
|
@ -48,28 +46,15 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function showData()
|
||||
{literal}
|
||||
{
|
||||
document.getElementById('div_Data').style.display = 'inherit';
|
||||
document.getElementById('div_MData').style.display = 'none';
|
||||
}
|
||||
|
||||
function showMData()
|
||||
{
|
||||
document.getElementById('div_MData').style.display = 'inherit';
|
||||
document.getElementById('div_Data').style.display = 'none';
|
||||
}
|
||||
{/literal}
|
||||
<script language="javascript">
|
||||
|
||||
{if $_REQUEST.act == addFileData || $_REQUEST.act == addWebstreamData}
|
||||
document.getElementById('div_MData').style.display = 'none';
|
||||
{else}
|
||||
document.getElementById('div_Data').style.display = 'none';
|
||||
showMain();
|
||||
{/if}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
{UIBROWSER->metaDataForm id=$editItem.id langid=$editItem.curr_langid assign="_metadataform"}
|
||||
|
||||
<div id="tabnav">
|
||||
<ul>
|
||||
<li><a href="#" onClick="javascript:showMain();" id="switch_Main">##Main##</a></li>
|
||||
<li><a href="#" onClick="javascript:showMusic();" id="switch_Music">##Music##</a></li>
|
||||
<li><a href="#" onClick="javascript:showTalk();" id="switch_Talk">##Talk##</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{assign var="dynform" value=$_metadataform.langswitch}
|
||||
{include file="sub/dynForm_plain.tpl"}
|
||||
|
||||
|
@ -69,34 +61,5 @@ function spread(element, name)
|
|||
if (document.forms['editMetaData'].elements['Music___' + name]) document.forms['editMetaData'].elements['Music___' + name].value = element.value;
|
||||
if (document.forms['editMetaData'].elements['Talk___' + name]) document.forms['editMetaData'].elements['Talk___' + name].value = element.value;
|
||||
}
|
||||
|
||||
function showMain()
|
||||
{
|
||||
document.getElementById('div_Main').style.display = 'inline';
|
||||
document.getElementById('div_Music').style.display = 'none';
|
||||
document.getElementById('div_Talk').style.display = 'none';
|
||||
document.getElementById('switch_Main').className = 'active';
|
||||
document.getElementById('switch_Music').className = '';
|
||||
document.getElementById('switch_Talk').className = '';
|
||||
}
|
||||
function showMusic()
|
||||
{
|
||||
document.getElementById('div_Main').style.display = 'none';
|
||||
document.getElementById('div_Music').style.display = 'inline';
|
||||
document.getElementById('div_Talk').style.display = 'none';
|
||||
document.getElementById('switch_Main').className = '';
|
||||
document.getElementById('switch_Music').className = 'active';
|
||||
document.getElementById('switch_Talk').className = '';
|
||||
}
|
||||
function showTalk()
|
||||
{
|
||||
document.getElementById('div_Main').style.display = 'none';
|
||||
document.getElementById('div_Music').style.display = 'none';
|
||||
document.getElementById('div_Talk').style.display = 'inline';
|
||||
document.getElementById('switch_Main').className = '';
|
||||
document.getElementById('switch_Music').className = '';
|
||||
document.getElementById('switch_Talk').className = 'active';
|
||||
}
|
||||
showMain();
|
||||
{/literal}
|
||||
</script>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="copyright">LiveSupport 1.0 rc ©2005 <a href="http://www.mdlf.org" target="_blank">MDLF</a> - maintained and distributed under GNU/GPL by <a href="http://www.campware.org" target="_blank">CAMPWARE</a></div>
|
||||
<div class="copyright">{$UI_VERSION} ©2005 <a href="http://www.mdlf.org" target="_blank">MDLF</a> - maintained and distributed under GNU/GPL by <a href="http://www.campware.org" target="_blank">CAMPWARE</a></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -3,16 +3,6 @@
|
|||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<!--
|
||||
<table height="100%" width="100%"><tr><td><center>
|
||||
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="50" height="50" id="preloader" align="middle">
|
||||
<param name="allowScriptAccess" value="sameDomain" />
|
||||
<param name="movie" value="img/preloader.swf" />
|
||||
<param name="quality" value="high" />
|
||||
<param name="bgcolor" value="#ffffff" />
|
||||
<embed src="img/preloader.swf" quality="high" bgcolor="#ffffff" width="50" height="50" name="preloader" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
|
||||
</object>
|
||||
-->
|
||||
<img src="img/ls_logo_animated.gif">
|
||||
</center>
|
||||
</td></tr></table>
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
</ul>
|
||||
</li>
|
||||
{/if}
|
||||
<li><a href="#" onClick="window.open('help.html','','scrollbars=yes,resizable=yes,width=500,height=400')">##Help##</a></li>
|
||||
<li><a href="" onclick="window.open('{$UI_BROWSER}?popup[]=help', 'help', 'scrollbars=yes,resizable=yes,width=500,height=800')">##Help##</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- end nav -->
|
||||
|
|
|
@ -14,17 +14,18 @@
|
|||
<div>
|
||||
{if $data.type.valid === true}
|
||||
{tra str='Stream is wanted type <font color="green">$1</font>.' 1=$data.type.type}
|
||||
|
||||
{else}
|
||||
{tra str='Stream has wrong content type <font color="red">$1</font>.' 1=$data.type.type}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
|
||||
<p><input type="button" class="button" value="##Listen##" onclick="listenStream()"></p>
|
||||
<br>
|
||||
|
||||
<div>
|
||||
{if $data.header}
|
||||
Returned connection header:
|
||||
<pre>{$data.header}</pre>
|
||||
Returned connection header:<pre>{$data.header}</pre>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
@ -32,6 +33,17 @@
|
|||
<div>{tra str='Connection to $1 port $2 $3' 1=$data.host 2=$data.port 3='<font color="red">failed</font>'}</div>
|
||||
{/if}
|
||||
|
||||
<script language="javascript">
|
||||
{literal}
|
||||
function listenStream()
|
||||
{
|
||||
{/literal}
|
||||
testStreamWin = window.open("{$UI_TESTSTREAM_MU3_TMP}", "Test Stream", "width=100, height=100");
|
||||
setTimeout("testStreamWin.close()", 5000);
|
||||
{literal}
|
||||
}
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -21,8 +21,8 @@ function tra($input)
|
|||
{
|
||||
## initialize at first call of this function ###
|
||||
|
||||
#$GS =& $_SESSION['GS'];
|
||||
static $GS;
|
||||
$GS =& $_SESSION['GS'];
|
||||
#static $GS;
|
||||
global $uiBase;
|
||||
|
||||
if ($uiBase->langid && !is_array($GS)) {
|
||||
|
|
|
@ -375,6 +375,11 @@ class uiBrowser extends uiBase {
|
|||
*/
|
||||
function testStream($url)
|
||||
{
|
||||
touch(UI_TESTSTREAM_MU3_TMP);
|
||||
$handle = fopen(UI_TESTSTREAM_MU3_TMP, "w");
|
||||
fwrite($handle, $url);
|
||||
fclose($handle);
|
||||
|
||||
$parse = parse_url($url);
|
||||
$host = $parse["host"];
|
||||
$port = $parse["port"] ? $parse["port"] : 80;
|
||||
|
@ -394,7 +399,7 @@ class uiBrowser extends uiBase {
|
|||
if ($type = stristr($val, "content-type:")) {
|
||||
$type = explode(':', $type);
|
||||
|
||||
foreach ($this->config['stream_types'] as $t) { echo $t;
|
||||
foreach ($this->config['stream_types'] as $t) {
|
||||
if (preg_match('/'.str_replace('/', '\/', $t).'/i', $type[1])) {
|
||||
$match = TRUE;
|
||||
break;
|
||||
|
|
|
@ -24,8 +24,10 @@ $Smarty->load_filter('output', 'localizer');
|
|||
|
||||
|
||||
## some basic things ################################################
|
||||
$Smarty->assign('UI_BROWSER', UI_BROWSER);
|
||||
$Smarty->assign('UI_HANDLER', UI_HANDLER);
|
||||
foreach (get_defined_constants() as $k=>$v) {
|
||||
$Smarty->assign($k, $v);
|
||||
}
|
||||
|
||||
$Smarty->assign('ACT', $_REQUEST['act']);
|
||||
$Smarty->assign('CONFIG', $config);
|
||||
$Smarty->assign('START', array(
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
define('UI_VERSION', 'LiveSupport 1.0 rc');
|
||||
define('UI_TESTSTREAM_MU3_TMP', 'img/test.m3u');
|
||||
|
||||
## Scheduler
|
||||
define('UI_SCHEDULER_DAEMON_CMD', 'make -C /var/www/livesupport/products/scheduler/ run >/tmp/scheduler.log 2>&1 &'); ## adjust the path here
|
||||
define('UI_SCHEDULER_DAEMON_NAME', 'scheduler'); ## this is just name of scheduler process to grep in process list for it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue