[add] change default titile of video

This commit is contained in:
Knah Tsaeb 2013-07-26 13:41:07 +02:00
parent e61d43da1f
commit 277ca16643
1 changed files with 25 additions and 16 deletions

View File

@ -11,13 +11,13 @@ if (!empty($ci['ac']) && $ci['ac'] === 'login') {
<input type="hidden" name="op" value="2"/>
<input type="hidden" name="ac" value="login"/>
<input type="hidden" name="bc" value="'.$ci['bc'].'" />
<input type="hidden" name="token" value="', genToken(), '"/>
<input type="hidden" name="token" value="', genToken(), '"/>
<input type="submit" />
</fieldset>
</form>';
}
if (!empty($ci['ac']) && $ci['ac'] === 'newDir') {
echo '<form action="?" method="post">
echo '<form action="?" method="post">
<fieldset>
<legend>New directory</legend>
<label>Name</label>
@ -25,13 +25,13 @@ if (!empty($ci['ac']) && $ci['ac'] === 'newDir') {
<input type="hidden" name="op" value="1"/>
<input type="hidden" name="ac" value="newDir" />
<input type="hidden" name="bc" value="'.$ci['bc'].'" />
<input type="hidden" name="token" value="', genToken(), '"/>
<input type="hidden" name="token" value="', genToken(), '"/>
<input type="submit"/>
</fieldset>
</form>';
}
if (!empty($ci['ac']) && $ci['ac'] === 'renDir') {
if (empty($ci['op'])){
if (empty($ci['op'])) {
$currentDir = getCurrentDir($ci['bc']);
echo '<form action="?" method="post">
<fieldset>
@ -41,14 +41,14 @@ if (!empty($ci['ac']) && $ci['ac'] === 'renDir') {
<input type="hidden" name="op" value="1"/>
<input type="hidden" name="ac" value="renDir" />
<input type="hidden" name="bc" value="'.$ci['bc'].'" />
<input type="hidden" name="token" value="', genToken(), '"/>
<input type="hidden" name="token" value="', genToken(), '"/>
<input type="submit"/>
</fieldset>
</form>';
}
}
if (!empty($ci['ac']) && $ci['ac'] === 'addVideo') {
echo '<form action="?" method="post">
echo '<form action="?" method="post">
<fieldset>
<legend>New video</legend>
<label>Url</label>
@ -66,7 +66,7 @@ if (!empty($ci['ac']) && $ci['ac'] === 'addVideo') {
<input type="hidden" name="op" value="1"/>
<input type="hidden" name="ac" value="addVideo" />
<input type="hidden" name="bc" value="'.$ci['bc'].'" />
<input type="hidden" name="token" value="', genToken(), '"/>
<input type="hidden" name="token" value="', genToken(), '"/>
<input type="submit"/>
</fieldset>
</form>';
@ -122,8 +122,13 @@ if (!empty($listCurrentFile) && $ci['ac'] !== 'view') {
echo '</div>';
if ($ci['ac'] === 'view' && !empty($listCurrentFile)) {
if (!empty($videoInfo)) {
if (empty($videoInfo['title'])) {
$fullTitle = $videoInfo['originalTitle'];
} else {
$fullTitle = $videoInfo['title'].' ('.$videoInfo['originalTitle'].')';
}
echo '<div id="viewFile">';
echo '<h2>', $videoInfo['title'], ' (', $videoInfo['originalTitle'], ')</h2>';
echo '<h2>', $fullTitle,'</h2>';
echo '<video width="640" controls="controls" poster="', $path.$videoInfo['hash'], '.jpg">';
echo '<source src="', $path.$videoInfo['hash'], '.webm" type="video/webm" />';
echo '<source src="', $path.$videoInfo['hash'], '.mp4" type="video/mp4" />';
@ -142,7 +147,11 @@ if ($ci['ac'] === 'view' && !empty($listCurrentFile)) {
echo '<table>
<tr>
<th>Title</th>
<td>', $videoInfo['title'], ' (', $videoInfo['originalTitle'], ')</td>
<td>', $videoInfo['title'],'</td>
</tr>
<tr>
<th>Original title</th>
<td>', $videoInfo['originalTitle'],'</td>
</tr>
<tr>
<th>Description</th>
@ -154,7 +163,7 @@ if ($ci['ac'] === 'view' && !empty($listCurrentFile)) {
</tr>
<tr>
<th>Url</th>
<td><a href="', htmlentities($videoInfo['url']), '">', $videoInfo['url'], '</a></td>
<td><a href="', htmlentities($videoInfo['url']), '">', $videoInfo['url'], '</a></td>
</tr>
<tr>
<th>Duration</th>
@ -166,12 +175,12 @@ if ($ci['ac'] === 'view' && !empty($listCurrentFile)) {
<tr>
<th>Via</th>
<td>';
if(!empty($videoInfo['via'])) {
echo '<a href="', htmlentities($videoInfo['via']), '">', $videoInfo['via'], '</a>';
} else {
echo '';
}
echo '
if (!empty($videoInfo['via'])) {
echo '<a href="', htmlentities($videoInfo['via']), '">', $videoInfo['via'], '</a>';
} else {
echo '';
}
echo '
</td>
</tr>
<tr>