feat: add videodb media index with Docker stack

- Add videodb PHP/MySQL media collection manager (Blu-ray, DVD, CD)
- Dockerfile: PHP 8.1 + Apache with GD/mysqli/exif extensions
- docker-compose.yml: app on port 6761 + MySQL 8.0 with health checks
- docker-entrypoint.sh: auto-generates config.inc.php from env vars,
  waits for MySQL, initializes DB schema idempotently
- init-db.php: CLI schema installer using app's own prefix_query() logic
- Persistent volumes for DB, cache, and cover images

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-11 09:49:52 +02:00
commit f55c91276e
1230 changed files with 252321 additions and 0 deletions

View File

@@ -0,0 +1,98 @@
{*
Borrow template
$Id: borrow.tpl,v 1.4 2013/03/12 19:13:18 andig2 Exp $
*}
<!-- {$smarty.template} -->
<div class="row">
<div class="small-12 large-8 columns small-centered">
<h3 class="subheader">{$lang.borrow}</h3>
{if $diskid && $editable}
<form action="borrow.php" name="formborrow" method="post">
<input type="hidden" name="diskid" value="{$diskid}" />
<input type="hidden" name="return" value="1" />
{if $who}
<h5 class="subheader">
{$lang.diskid} {$diskid}
{$lang.lentto} {$who} ({$dt})
</h5>
<input type="submit" class="button" value="{$lang.returned}" />
{else}
<h5 class="subheader">
{$lang.diskid} {$diskid} {$lang.available}
</h5>
<div class="row collapse">
<div class="small-10 columns">
<input type="text" name="who" />
</div>
<div class="small-2 columns">
<a href="#" class="button postfix submit">{$lang.borrow}</a>
</div>
</div>
{/if}
</form>
{/if}
{if $config.multiuser}
<h5 class="subheader">{$lang.curlentfrom}</h5>
<form action="borrow.php">
{html_options name=owner options=$owners selected=$owner class="autosubmit"}
</form>
{else}
<h5 class="subheader">{$lang.curlent}</h5>
{/if}
{if $borrowlist}
<table class="small-12">
<thead>
<tr>
<th><h5 class="subheader">{$lang.diskid}</h5></th>
{if $config.multiuser}<th><h5 class="subheader">{$lang.owner}</h5></th>{/if}
<th><h5 class="subheader">{$lang.title}</h5></th>
<th><h5 class="subheader">{$lang.lentto}</h5></th>
<th><h5 class="subheader">{$lang.date}</h5></th>
<th></th>
</tr>
</thead>
<tbody>
{foreach item=disk from=$borrowlist}
<tr>
<td><a href="search.php?q={$disk.diskid}&amp;fields=diskid&amp;nowild=1">{$disk.diskid}</a></td>
{if $config.multiuser}
<td>{$disk.owner}</td>
{/if}
<td>
<a href="show.php?id={$disk.id}">{$disk.title}</a>
{if $disk.count > 1} ... {/if}
</td>
<td>{$disk.who}</td>
<td>{$disk.dt}</td>
<td>
{if $disk.editable}
<form action="borrow.php" method="get">
<input type="hidden" name="diskid" value="{$disk.diskid}" />
<input type="hidden" name="return" value="1" />
<input type="submit" class="button small" value="{$lang.returned}" />
</form>
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>
{else}
<div class="alert-box">
{$lang.l_nothing}
</div>
{/if}
</div><!-- col -->
</div><!-- row -->

View File

@@ -0,0 +1,17 @@
{*
Tools template
$Id: contrib.tpl,v 1.3 2013/03/12 19:13:18 andig2 Exp $
*}
<!-- {$smarty.template} -->
<div class="row">
<div class="small-12 large-10 columns small-centered">
<h3 class="subheader">{$lang.contrib}</h3>
<div class="small-cols-1 large-cols-2">
<ul class="six side-nav">
{foreach item=file from=$files}
<li><a href="{$file[0]}">{$file[1]}</a></li>
{/foreach}
</ul>
</div><!-- two-col -->
</div><!-- col -->
</div><!-- row -->

View File

@@ -0,0 +1,339 @@
{*
Edit template
$Id: edit.tpl,v 1.8 2013/03/14 17:17:27 andig2 Exp $
*}
<!-- {$smarty.template} -->
<script type="text/javascript" src="{$template}js/edit.js"></script>
<!--
<div id="images">Alternative images:</div>
-->
<form action="edit.php" method="post" enctype="multipart/form-data" name="edi">
<input type="hidden" name="id" value="{if !empty($video.id)}{$video.id}{/if}" />
<input type="hidden" name="save" value="1" />
<input type="hidden" name="autoid" value="{$autoid}" />
<input type="hidden" name="oldmediatype" value="{$video.mediatype}" />
<div class="row header">
<div class="small-12 large-7 columns">
<dl class="sub-nav" input-radio>
<dt>{$lang.radio_look_caption}:</dt>
{foreach $lookup key=k item=v}
<dd {if $lookup_id==$k}class="active"{/if}><a href="lookup" value="{$k}">{$v}</a></dd>
{/foreach}
</dl>
</div><!-- col -->
<div class="small-12 large-5 columns">
<div class="row collapse">
<div class="small-6 large-6 columns">
<dl class="sub-nav" input-checkbox>
<dt>{$lang.create_}</dt>
<dd {if !empty($add_flag)}class="active"{/if}><a href="add_flag" value="1">{$lang.add_another}</a></dd>
</dl>
</div><!-- col -->
<div class="small-6 large-6 columns">
<ul class="button-group right hide-for-small">
<li>
<a href="{if !empty($video.id)}show.php?id={$video.id}{else}index.php{/if}" class="button small">{$lang.cancel}</a>
<a href="#" class="button small submit">{$lang.save}</a>
</li>
</ul>
<ul class="button-group right hide-for-medium-up">
<li>
<a href="{if !empty($video.id)}show.php?id={$video.id}{else}index.php{/if}" class="button tiny">{$lang.cancel}</a>
<a href="#" class="button tiny submit">{$lang.save}</a>
</li>
</ul>
</div>
</div><!-- row -->
</div><!-- col -->
</div><!-- button-bar -->
<div class="row">
<div class="small-12 large-10 columns large-centered">
{if $http_error}
<div class="alert-box alert">
{$http_error}
<a href="#" class="close">&times;</a>
</div>
{/if}
<h4 class="subheader">{$lang.main_details}</h4>
<div class="row">
<div class="small-12 large-6 columns">
<label for="title">{$lang.title} <a href="javascript:void(lookupData(document.edi.title.value))"><i class="foundicon-search inline"></i></a></label>
<input type="text" name="title" id="title" value="{if !empty($video.q_title)}{$video.q_title}{/if}" class="autofocus" />
</div><!-- col -->
<div class="small-12 large-6 columns">
<label for="subtitle">{$lang.subtitle} <a href="javascript:void(lookupData(document.edi.subtitle.value))"><i class="foundicon-search inline"></i></a></label>
<input type="text" name="subtitle" id="subtitle" value="{if !empty($video.q_subtitle)}{$video.q_subtitle}{/if}"/>
</div><!-- col -->
</div><!-- row -->
<div class="row">
<div class="small-6 large-3 columns">
<label for="director">{$lang.director}</label>
<input type="text" name="director" id="director" value="{if !empty($video.q_director)}{$video.q_director}{/if}"/>
</div><!-- col -->
<div class="small-2 large-1 columns">
<label for="year">{$lang.year}</label>
<input type="text" name="year" id="year" alue="{if !empty($video.year)}{$video.year}{/if}"/>
</div><!-- col -->
<div class="small-4 large-2 columns">
<div class="row collapse">
<label for="runtime">{$lang.runtime}</label>
<div class="small-8 columns">
<input type="text" name="runtime" id="runtime" value="{if !empty($video.q_runtime)}{$video.q_runtime}{/if}" />
</div><!-- col -->
<div class="small-4 columns"><span class="postfix">min</span></div>
</div><!-- row -->
</div><!-- col -->
<div class="small-6 large-3 columns">
<label for="country">{$lang.country}</label>
<input type="text" name="country" id="country" value="{if !empty($video.q_country)}{$video.q_country}{/if}"/>
</div><!-- col -->
<div class="small-6 large-3 columns">
<label for="language">{$lang.language}</label>
{$video.f_language}
</div><!-- col -->
</div><!-- row -->
<div class="row">
<div class="small-2 large-1 columns">
<dl class="sub-nav" input-radio>
<dt>{$lang.rating}</dt>
</dl>
</div><!-- col -->
<div class="small-4 large-5 columns">
<dl class="sub-nav tight" input-radio>
{if !empty($video.rating)}
{$rate = $video.rating}
{else}
{$rate = 0}
{/if}
{for $r=0 to 10}
<dd {if $r == $rate|round}class="active"{/if}><a href="rating" value="{$r}">{$r}</a></dd>
{/for}
</dl>
</div><!-- col -->
<div class="small-6 columns">
<dl class="sub-nav inline" input-checkbox>
<dd {if !empty($video.seen)}class="active"{/if}><a href="seen" value="1">{$lang.seen}</a></dd>
</dl>
<dl class="sub-nav inline" input-checkbox>
<dd {if !empty($video.istv)}class="active"{/if}><a href="istv" value="1">{$lang.tvepisode}</a></dd>
</dl>
<dl class="sub-nav inline" input-checkbox>
{* <dd {if $video.3d}class="active"{/if}><a href="3d" value="1">{$lang.3d}3D</a></dd> *}
<dd {if !empty($video.3d)}class="active"{/if}>
<a href="3d" value="1">{$lang.3d}</a>
</dl>
</div><!-- col -->
</div><!-- row -->
<div class="row">
<div class="small-2 large-1 columns">
<dl class="sub-nav" input-checkbox>
<dt>{$lang.genre}</dt>
</dl>
</div><!-- col -->
<div class="small-10 large-11 columns">
<dl class="sub-nav" input-checkbox>
{foreach $genres as $genre}
<dd {if !empty($genre.checked)}class="active"{/if}><a href="genres[]" value="{$genre.id}">{$genre.name}</a></dd>
{/foreach}
</dl>
</div><!-- col -->
</div><!-- row -->
<h4 class="subheader">{$lang.media_details}</h4>
<div class="row">
<div class="small-12 large-6 columns">
<div class="row">
<div class="small-6 columns">
<label for="mediatype">{$lang.mediatype}</label>
{html_options name="mediatype" options=$mediatypes selected=$video.mediatype}
</div><!-- col -->
<div class="small-6 columns">
<label for="diskid">{$lang.diskid}</label>
<input type="text" name="diskid" id="diskid" value="{if !empty($video.q_diskid)}{$video.q_diskid}{/if}" />
</div><!-- col -->
</div></div><!-- row/col -->
<div class="small-12 large-6 columns">
<div class="row">
{if !empty($owners)}
<div class="small-6 columns">
<label>{$lang.owner}</label>
{html_options name=owner_id options=$owners selected=$video.owner_id}
</div><!-- col -->
{/if}
<div class="{if !empty($owners)}small-6{else}small-12{/if} columns">
<label for="imdbID">
{$lang.extid}
</label>
<div class="row collapse">
<div class="small-8 columns">
<input type="text" name="imdbID" id="imdbID" value="{if !empty($video.q_imdbID)}{$video.q_imdbID}{/if}" />
</div><!-- col -->
<div class="small-4 columns">
<a href="{if !empty($link)}{$link}{/if}" target="_blank" class="button postfix {if empty($link)}disabled{/if}">{$lang.visit}</a>
</div><!-- col -->
</div><!-- row -->
</div><!-- col -->
</div></div><!-- row/col -->
</div><!-- row -->
<div class="row">
<div class="small-12 large-6 columns">
<label for="imgurl">
{$lang.coverurl}
<a href="javascript:void(lookupImage(document.edi.title.value))"><i class="foundicon-search inline"></i></a>
</label>
<input type="text" name="imgurl" id="imgurl" value="{if !empty($video.q_imgurl)}{$video.q_imgurl}{/if}" />
</div><!-- col -->
<div class="small-12 large-6 columns">
<label>{$lang.coverupload}</label>
<div class="row collapse">
<div class="small-10 columns">
<input type="file" name="coverupload" id="coverupload" />
</div><!-- col -->
<div class="small-2 columns">
<a href='#' class="button postfix input-browse">{$lang.input_browse}</a>
</div><!-- col -->
</div>
</div><!-- col -->
</div><!-- row -->
<h4 class="subheader">{$lang.description_details}</h4>
<div class="row">
<div class="small-12 large-6 columns">
<label for="plot">{$lang.plot}</label>
<textarea class="large" name="plot" id="plot" wrap="virtual">{if !empty($video.q_plot)}{$video.q_plot}{/if}</textarea>
</div><!-- col -->
<div class="small-12 large-6 columns">
<label for="actors">{$lang.cast}</label>
<textarea class="large" name="actors" id="actors" wrap="off">{if !empty($video.q_actors)}{$video.q_actors}{/if}</textarea>
</div><!-- col -->
<div class="small-12 columns">
<label for="comment">{$lang.comment}</label>
<textarea class="large" name="comment" id="comment" wrap="virtual">{if !empty($video.q_comment)}{$video.q_comment}{/if}</textarea>
</div><!-- col -->
</div><!-- row -->
<h4 class="subheader">{$lang.file_details}</h4>
<div class="row">
<div class="small-12 large-6 columns">
<label for="filename">{$lang.filename}</label>
<input type="text" name="filename" id="filename" value="{if !empty($video.q_filename)}{$video.q_filename}{/if}"/>
</div><!-- col -->
<div class="small-6 large-4 columns">
<label for="filedate">{$lang.filedate}</label>
<input type="text" name="filedate" id="filedate" value="{if !empty($video.q_filedate)}{$video.q_filedate}{/if}"/>
</div><!-- col -->
<div class="small-6 large-2 columns">
<div class="row collapse">
<label for="filesize">{$lang.filesize}</label>
<div class="small-8 columns">
<input type="text" name="filesize" id="filesize" value="{if !empty($video.q_filesize)}{$video.q_filesize}{/if}"/>
</div><!-- col -->
<div class="small-4 columns"><span class="postfix">{$lang.bytes}</span></div>
</div><!-- row -->
</div><!-- col -->
</div><!-- row -->
<div class="row">
<div class="small-6 large-5 columns">
<label for="audio_codec">{$lang.audiocodec}</label>
<input type="text" name="audio_codec" id="audio_codec" value="{if !empty($video.q_audio_codec)}{$video.q_audio_codec}{/if}" />
</div><!-- col -->
<div class="small-6 large-5 columns">
<label for="video_codec">{$lang.videocodec}</label>
<input type="text" name="video_codec" id="video_codec" value="{if !empty($video.q_video_codec)}{$video.q_video_codec}{/if}" />
</div><!-- col -->
<div class="small-12 large-2 columns">
<div class="row collapse">
<label for="video_width">{$lang.dimension}</label>
<div class="small-5 columns">
<input type="text" name="video_width" id="video_width" value="{if !empty($video.q_video_width)}{$video.q_video_width}{/if}"/>
</div><!-- col -->
<div class="small-2 column"><span class="postfix">x</span></div>
<div class="small-5 columns">
<input type="text" name="video_height" id="video_height" value="{if !empty($video.q_video_height)}{$video.q_video_height}{/if}"/>
</div><!-- col -->
</div><!-- row -->
</div><!-- col -->
</div><!-- row -->
{if !empty($video.custom1name) || !empty($video.custom2name) || !empty($video.custom3name) || !empty($video.custom4name)}
<h4 class="subheader">{$lang.custom_details}</h4>
<div class="row">
{if !empty($video.custom1name)}
<div class="small-6 columns">
<label>{$video.custom1name}</label>{$video.custom1in}
</div><!-- col -->
{/if}
{if !empty($video.custom2name)}
<div class="small-6 columns">
<label>{$video.custom2name}</label>{$video.custom2in}
</div><!-- col -->
{/if}
</div><!-- row -->
<div class="row">
{if !empty($video.custom3name)}
<div class="small-6 columns">
<label>{$video.custom3name}</label>{$video.custom3in}
</div><!-- col -->
{/if}
{if !empty($video.custom4name)}
<div class="small-6 columns">
<label>{$video.custom4name}</label>{$video.custom4in}
</div><!-- col -->
{/if}
</div><!-- row -->
{/if}
</div><!-- col -->
</div><!-- row -->
</form>

View File

@@ -0,0 +1,58 @@
{*
Filters template
$Id: filters.tpl,v 1.2 2013/03/12 19:13:18 andig2 Exp $
*}
<!-- {$smarty.template} -->
{*
<div class="row">
<div class="small-12 columns">
<dl class="sub-nav">
<dt>{$lang.title}:</dt>
{foreach $filters key=k item=v}
<dd {if $filter==$k}class="active"{/if}><a href="index.php?filter={$k}">{$v}</a></dd>
{/foreach}
</dl>
</div><!-- col -->
</div><!-- row -->
<div class="row">
<div class="small-12 columns">
<dl class="sub-nav">
<dt>{$lang.mediatype}:</dt>
{foreach from=$mediafilter key=k item=v}
<dd {if $mediatype==$k}class="active"{/if}><a href="index.php?mediafilter={$k}">{$v|escape}</a></dd>
{/foreach}
</dl>
</div><!-- col -->
</div><!-- row -->
<div class="row">
{if !empty($owners)}
<div class="small-12 columns">
<dl class="sub-nav">
<dt>{$lang.owner}:</dt>
{foreach from=$owners key=k item=v}
<dd {if $owner==$v}class="active"{/if}><a href="index.php?owner={$v|escape:url}">{$v|escape}</a></dd>
{/foreach}
</dl>
</div><!-- col -->
{/if}
</div><!-- row -->
<div class="row">
{if $order_options}
<div class="small-12 columns">
<dl class="sub-nav">
<dt>{$lang.order}:</dt>
{foreach from=$order_options key=k item=v}
<dd {if $order==$k}class="active"{/if}><a href="index.php?order={$k|escape:url}">{$v|escape}</a></dd>
{/foreach}
</dl>
</div><!-- col -->
{/if}
</div><!-- row -->
*}

View File

@@ -0,0 +1,42 @@
{*
Footer template
$Id: footer.tpl,v 1.2 2013/03/12 19:13:18 andig2 Exp $
*}
<!-- {$smarty.template} -->
{if !empty($pageno) && !empty($maxpageno)}
<footer>
<div class="pagination-centered">
<ul class="pagination">
<li class="arrow {if $pageno <= 1}unavailable{/if}"><a href="{if $pageno <= 1}#{else}index.php?pageno={$pageno-1}{/if}">&laquo;</a></li>
{assign var=delta value=2}
{if $maxpageno > 0}
<li {if $pageno == 1}class="current"{/if}><a href="index.php?pageno=1">1</a></li>
{/if}
{if $pageno-$delta > 2}<li class="unavailable"><a href="">&hellip;</a></li>{/if}
{for $page=($pageno-$delta)|max:2 to ($pageno+$delta)|min:($maxpageno-1)}
<li {if $page==$pageno}class="current"{/if}><a href="index.php?pageno={$page}">{$page}</a></li>
{/for}
{if $pageno+$delta <= $maxpageno-2}<li class="unavailable"><a href="">&hellip;</a></li>{/if}
{if $maxpageno > 1}
<li {if $pageno == $maxpageno}class="current"{/if}><a href="index.php?pageno={$maxpageno}">{$maxpageno}</a></li>
{/if}
<li class="arrow {if $pageno >= $maxpageno}unavailable{/if}"><a href="{if $pageno >= $maxpageno}#{else}index.php?pageno={$pageno+1}{/if}">&raquo;</a></li>
</ul>
</div>
</footer>
{/if}
{if $DEBUG}
<div class="row">{$DEBUG}</div>
{/if}
</body>
</html>

View File

@@ -0,0 +1,195 @@
{*
Header template
$Id: header.tpl,v 1.9 2013/03/21 16:27:57 andig2 Exp $
*}
{include file="xml.tpl"}
<body>
<!-- {$smarty.template} -->
<!-- top-bar -->
<nav class="top-bar">
<ul class="title-area">
<li class="name">
<h1><a href="https://github.com/andig/videodb.git">video|db</a></h1>
</li>
<li class="toggle-topbar menu-icon">
<a href="#"><span>{$lang.menu}</span></a>
</li>
</ul>
<!-- top-bar contents -->
<section class="top-bar-section">
<ul class="left">
{if !empty($header.trace)}<li{if $header.active == 'trace'} class="active"{/if}><a href="{$header.trace}?iframe=1">IMDB</a></li>{/if}
{if !empty($header.new)}<li{if $header.active == 'new' || $header.active == 'edit'} class="active"{/if}><a href="{$header.new}">{$lang.create}</a></li>{/if}
{if !empty($header.browse)}
<li class="has-dropdown hide-for-small {if $header.active == 'browse'}active{/if}">
<a href="{$header.browse}">{$lang.browse}</a>
{if $header.active == 'browse'}
<ul class="dropdown large hide-for-small">
<li>
<dl class="sub-nav">
<dt>{$lang.title}:</dt>
{foreach $filters key=k item=v}
<dd {if $filter==$k}class="active"{/if}><a href="index.php?filter={$k}">{$v}</a></dd>
{/foreach}
</dl>
</li>
<li>
<dl class="sub-nav">
<dt>{$lang.mediatype}:</dt>
{foreach from=$mediafilter key=k item=v}
<dd {if $mediatype==$k}class="active"{/if}><a href="index.php?mediafilter={$k}">{$v|escape}</a></dd>
{/foreach}
</dl>
</li>
{if !empty($owners)}
<li>
<dl class="sub-nav">
<dt>{$lang.owner}:</dt>
{foreach from=$owners key=k item=v}
<dd {if $owner==$v}class="active"{/if}><a href="index.php?owner={$v|escape:url}">{$v|escape}</a></dd>
{/foreach}
</dl>
</li>
{/if}
{if !empty($order_options)}
<li>
<dl class="sub-nav">
<dt>{$lang.order}:</dt>
{foreach from=$order_options key=k item=v}
<dd {if $order==$k}class="active"{/if}><a href="index.php?order={$k|escape:url}">{$v|escape}</a></dd>
{/foreach}
</dl>
</li>
{/if}
</ul>
{/if}
</li>
{/if}
{if !empty($header.browse)}
<li class="hide-for-medium-up {if $header.active == 'browse'}active{/if}">
<a href="{$header.browse}">{$lang.browse}</a>
</li>
{/if}
{if $header.active == 'browse'}
<li class="has-dropdown hide-for-medium-up">
<a href="#">{$lang.filter}</a>
<ul class="dropdown">
<li class="has-dropdown">
<a href="#">{$lang.title}</a>
<ul class="dropdown">
{foreach $filters key=k item=v}
<li {if $filter==$k}class="active"{/if}><a href="index.php?filter={$k}">{$v}</a></li>
{/foreach}
</ul>
</li>
<li class="has-dropdown">
<a href="#">{$lang.mediatype}</a>
<ul class="dropdown">
{foreach from=$mediafilter key=k item=v}
<li {if $mediatype==$k}class="active"{/if}><a href="index.php?mediafilter={$k}">{$v|escape}</a></li>
{/foreach}
</ul>
</li>
{if !empty($owners)}
<li class="has-dropdown">
<a href="#">{$lang.owner}</a>
<ul class="dropdown">
{foreach from=$owners key=k item=v}
<li {if $owner==$v}class="active"{/if}><a href="index.php?owner={$v|escape:url}">{$v|escape}</a></li>
{/foreach}
</ul>
</li>
{/if}
</ul>
</li>
{/if}
{if !empty($pdf) || !empty($xls) || !empty($xml)}
<li class="has-dropdown">
<a href="#">{$lang.export}</a>
<ul class="dropdown">
{if !empty($pdf)}<li><a href="{$pdf}export=pdf&ext=.pdf">Adobe PDF</a></li>{/if}
{if !empty($xls)}<li><a href="{$xls}export=xls&ext=.xls">Microsoft Excel</a></li>{/if}
{if !empty($xml)}<li><a href="{$xml}export=xml">XML</a></li>{/if}
</ul>
</li>
{/if}
<li class="has-dropdown {if $header.active == 'borrow' || $header.active == 'stats'}active{/if}">
<a href="#">{$lang.manage}</a>
<ul class="dropdown">
{if !empty($header.borrow)}<li{if $header.active == 'borrow'} class="active"{/if}><a href="{$header.borrow}">{$lang.borrow}</a></li>{/if}
{if !empty($header.stats)}<li{if $header.active == 'stats'} class="active"{/if}><a href="{$header.stats}">{$lang.statistics}</a></li>{/if}
</ul>
</li>
{if !empty($header.contrib) || !empty($header.profile) || !empty($header.setup)}
<li class="has-dropdown {if $header.active == 'setup' || $header.active == 'profile' || $header.active == 'contrib'}active{/if}">
<a href="{if !empty($header.setup)}{$header.setup}{else}{if !empty($header.profile)}{$header.profile}{else}#{/if}{/if}">{$lang.options}</a>
<ul class="dropdown">
{if !empty($header.setup)}<li{if $header.active == 'setup'} class="active"{/if}><a href="{$header.setup}">{$lang.setup}</a></li>{/if}
{if !empty($header.profile)}<li{if $header.active == 'profile'} class="active"{/if}><a href="{$header.profile}">{$lang.profile}</a></li>{/if}
{if !empty($header.users)}<li{if $header.active == 'users'} class="active"{/if}><a href="{$header.users}">{$lang.users}</a></li>{/if}
{if !empty($header.contrib)}<li{if $header.active == 'contrib'} class="active"{/if}><a href="{$header.contrib}">{$lang.contrib}</a></li>{/if}
</ul>
</li>
{/if}
</ul>
<ul class="right">
<!-- other elements for top bar -->
<li class="has-form">
<form action="search.php">
<input type="hidden" name="default" />
<div class="row collapse">
<div class="small-8 columns">
<input type="text" name="q" />
</div>
<div class="small-4 columns">
<button type="submit" class="button">{$lang.search}</button>
</div>
</div>
</form>
</li>
{if !empty($header.login)}
<li>
<a href="{$header.login}">{if !empty($loggedin)}{$lang.logout}{else}{$lang.login}{/if}</a>
</li>
{/if}
</ul>
</section>
</nav><!-- top-bar -->
{*
{if $header.active == 'browse' && $breadcrumbs}
<div class="row">
<div class="small-12 columns">
<ul class="breadcrumbs">
{foreach $breadcrumbs.crumbs as $b}
<li {if $b.id !== $breadcrumbs.current}class="current"{/if}><a href="show.php?id={$b.id}">{$b.title}</a></li>
{/foreach}
</ul>
</div><!-- col -->
</div><!-- row -->
{/if}
*}
<!-- /header -->

View File

@@ -0,0 +1,12 @@
{*
Help template
$Id: help.tpl,v 1.2 2013/03/12 19:13:18 andig2 Exp $
*}
<!-- {$smarty.template} -->
<div class="row">
<div class="small-12 columns">
{$helptext}
</div><!-- col -->
</div><!-- row -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -0,0 +1,125 @@
/**
* General logic
*
* @package JavaScript
* @author Andreas Goetz <cpuidle@gmx.de>
* @version $Id: app.js,v 1.7 2013/03/21 16:27:57 andig2 Exp $
*/
$(document).ready(function() {
// customize forms
$("form").addClass("custom");
// add submit on click
$(".autosubmit").change(function() {
$(this).parent().submit();
});
// add submit on click
$(".submit").click(function() {
$(this).closest("form").submit();
});
// disable "disabled" buttons
$("a.button.disabled").click(function(event) {
event.stopImmediatePropagation();
return(false);
});
// allow closing reveal dialogs
$(".button.close-modal").click(function() {
$(this).closest("div.reveal-modal").find('a.close-reveal-modal').trigger('click');
return(false);
});
// focus primary element (must be only one)
$(".autofocus").focus();
// prevent tabbing through <i> tags
$('i').parent().attr('tabindex', '-1');
// lazy-load images
if (typeof jQuery == "function" && typeof jQuery().lazyload == "function") {
$("img.lazy").lazyload({threshold: 500});
}
// substitute input[file] with custom control
$("input[type=file]").each(function() {
var proxy = $('<input type="text" value="'+$(this).val()+'" />');
var context = {_this: $(this), _proxy: proxy};
var intervalFunc = $.proxy(function() {
this._proxy.val(this._this.val());
}, context);
// hide file input and watch for changes
$(this)
.css("position", "absolute")
.css("opacity", "0.000001")
.attr("size", "100")
.parent().append(proxy)
.click(function() {
setInterval(intervalFunc, 1000);
});
});
// dl.input-radio
$("dl[input-radio] dd").each(function() {
var a = $(this).find("a");
// create proxy element
if ($(this).hasClass("active") && $("#"+a.attr("href")).length == 0) {
$(this).closest("form").append(
$('<input type="hidden" name="'+a.attr("href")+'" id="'+a.attr("href")+'" value="'+a.attr("value")+'" />')
);
}
// add click function
$(this).click(function() {
$(this).siblings().removeClass("active");
$(this).addClass("active");
// set proxy value
var a = $(this).find("a");
$("#"+a.attr("href")).val(a.attr("value"));
return(false);
});
});
// dl.input-checkbox
$("dl[input-checkbox] dd").each(function() {
var a = $(this).find("a");
var id = $(this).closest("form").attr("id")+a.attr("href").replace("[]","")+a.attr("value");
// create proxy elements
if ($("#"+id).length == 0) {
// alert($(this).closest("form").attr("id"));
$(this).closest("form").append(
$('<input type="hidden" name="'+a.attr("href")+'" id="'+id+'" value="' + (
($(this).hasClass("active")) ? a.attr("value") : ''
) + '" />')
);
}
// add click function
$(this).click(function() {
$(this).toggleClass("active");
// set proxy value
var a = $(this).find("a");
var id = $(this).closest("form").attr("id")+a.attr("href").replace("[]","")+a.attr("value");
// alert($("#"+id).closest("form").attr("action") +"/"+$("#"+id).closest("form").attr("id") +" "+ "#"+id + ":" + (($(this).hasClass("active")) ? a.attr("value") : ""));
$("#"+id).val(($(this).hasClass("active")) ? a.attr("value") : "");
return(false);
});
});
$('li a.seen').each(function() {
$(this).click(function(e) {
e.preventDefault();
var a = $(this);
var u = a.attr('href').replace('id=', 'ajax_update=');
$.get(u, function() {
a.addClass('disabled');
});
});
});
});

View File

@@ -0,0 +1,53 @@
/**
* Editing logic
*
* @package JavaScript
* @author Andreas Goetz <cpuidle@gmx.de>
* @version $Id: edit.js,v 1.3 2013/03/13 08:01:01 andig2 Exp $
*/
/*
$(document).ready(function () {
$("#title").autocomplete({
source: function(request, response) {
$.ajax({
url: "edit.php",
data: {
ajax_type: "json",
ajax_autocomplete_title: request.term
},
success: function(data) {
response($.map(data, function(item) {
return {
id: item.id,
value: item.title
}
}))
}
})
},
select: function(event, ui) {
$("#imdbID").val(ui.item.id);
$("#lookup1").click();
}
});
});
*/
function lookupData(title) {
var win = open('lookup.php?find=' + encodeURIComponent(title), 'lookup',
'width=700,height=600,menubar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no');
win.focus();
}
function lookupImage(title) {
var win = open('lookup.php?find=' + encodeURIComponent(title) + '&searchtype=image&engine=google', 'lookup',
'width=450,height=500,menubar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no');
win.focus();
}
function changedId() {
if ($("#imdbID").val()) {
$('#lookup1').click();
}
}

View File

@@ -0,0 +1,28 @@
/**
* Lookup data submission logic
*
* @package JavaScript
* @author Andreas Goetz <cpuidle@gmx.de>
* @version $Id: lookup.js,v 1.2 2013/03/16 10:10:07 andig2 Exp $
*/
window.focus();
function returnData(id, title, subtitle, engine) {
window.opener.$('#imdbID').val(id);
window.opener.$('#engine').val(engine);
window.opener.$('#title').val(title);
// $('#subtitle').val(subtitle);
window.opener.$('#lookup1').click();
opener.focus();
window.close();
}
function returnImage(imgurl) {
window.opener.$('#imgurl').val(imgurl);
opener.focus();
window.close();
}

View File

@@ -0,0 +1,34 @@
/**
* Search logic
*
* @package JavaScript
* @author Andreas Goetz <cpuidle@gmx.de>
* @version $Id: search.js,v 1.1 2013/03/10 16:18:26 andig2 Exp $
*/
$(document).ready(function () {
$("#q").autocomplete({
source: function(request, response) {
$.ajax({
url: "search.php",
data: {
ajax_type: "json",
ajax_autocomplete_title: request.term
},
success: function(data) {
response($.map(data, function(item) {
return {
id: item.id,
value: item.title
}
}))
}
})
},
select: function(event, ui) {
//$("#imdbID").val(ui.item.id);
//$("#lookup1").click();
}
});
});

View File

@@ -0,0 +1,43 @@
{*
List template
$Id: list.tpl,v 1.6 2013/03/21 16:27:57 andig2 Exp $
*}
<!-- {$smarty.template} -->
{if !empty($deleted)}
<div class="alert-box alert sticky">
{$lang.deleted}
<a href="#" class="close">&times;</a>
</div>
{/if}
<div class="row">
<div class="small-12 columns small-centered">
{assign var=max_width value=300}
{assign var=max_height value=500}
{if !empty($list)}
<ul class="small-block-grid-2 large-block-grid-{$listcolumns} itemlist">
{foreach $list as $video name=col}
<li>
<a href="show.php?id={$video.id}" class="th radius" title="{if $video.title}{$video.title}{if $video.subtitle} - {$video.subtitle}{/if}{else}(Empty title){/if}">
{if $config.browse_include_title eq top || $config.browse_include_title eq both}
<div style="margin-top:-5px;">{if $video.title}{$video.title}{if $video.subtitle} - {$video.subtitle}{/if}{else}(Empty title){/if}</div>
{/if}
{*
<!-- Uncomment this if you want to use lazy-load together with full-scale images (requires larger bandwidth - don't use for moile access) -->
{if $video.imgurl}<img class="lazy" src="{$video.imgurl}"/>{/if}
*}
<!-- Uncomment this if you want to use lazy-load together with image thumbnails - suited for mobile access -->
{if $video.imgurl}<img class="lazy" src="templates/nexgen/images/nocover.png" data-original="{html_image file=$video.imgurl max_width=$max_width max_height=$max_height path_only=1}"/>{/if}
{if $config.browse_include_title eq bottom || $config.browse_include_title eq both}
<div>{if $video.title}{$video.title}{if $video.subtitle} - {$video.subtitle}{/if}{else}(Empty title){/if}</div>
{/if}
</a>
</li><!--col-->
{/foreach}
</ul><!--row-->
{/if}
</div><!--column-->
</div><!--row-->

View File

@@ -0,0 +1,59 @@
{*
Login template
$Id: login.tpl,v 1.3 2013/03/12 19:13:18 andig2 Exp $
*}
<!-- {$smarty.template} -->
<div class="row">
<div class="small-12 large-4 columns small-centered panel">
{if $error}
<div class="alert-box">
{$error}
<a href="#" class="close">&times;</a>
</div>
{/if}
<p>{$lang.enterusername}</p>
<form action="login.php" method="post">
<input type="hidden" value="{$refer}" name="refer"/>
<div class="row">
<div class="small-4 columns">
<p>{$lang.username}:</p>
</div><!-- col -->
<div class="small-8 columns">
<input type="text" name="username" />
</div><!-- col -->
</div><!-- row -->
<div class="row">
<div class="small-4 columns">
<p>{$lang.password}:</p>
</div><!-- col -->
<div class="small-8 columns">
<input type="password" name="password" />
</div><!-- col -->
</div><!-- row -->
<div class="row">
<div class="small-12 columns">
<p>
<label class="inline"><input type="checkbox" name="permanent" value="1" />{$lang.stayloggedin}</label>
</p>
</div><!-- col -->
</div><!-- row -->
<div class="row">
<div class="small-12 columns small-centered">
<input type="submit" class="button" value="{$lang.login}" />
</div><!-- col -->
</div><!-- row -->
</form>
</div><!-- col -->
</div><!-- row -->

View File

@@ -0,0 +1,96 @@
{*
Lookup template
$Id: lookup.tpl,v 1.4 2013/03/16 14:29:47 andig2 Exp $
*}
{include file="xml.tpl"}
<body>
<script type="text/javascript" src="{$template}js/lookup.js"></script>
<!-- {$smarty.template} -->
<dl class="tabs">
{foreach key=e item=eng from=$engines}
<dd class="{if $engine == $e}active{/if}"><a href="{if $engine == $e}#{else}{$eng.url}{/if}">{$eng.name}</a></dd>
{/foreach}
</dl>
<div class="row">
<div class="small-12 columns">
<div class="row header">
<form action="lookup.php" name="formlookup" method="post">
<input type="hidden" name="engine" value="{$engine}" />
<input type="hidden" name="searchtype" value="{$searchtype}" />
<div class="small-6 columns">
<input type="text" name="find" id="find" value="{$q_find}" class="autofocus" />
</div><!-- col -->
<div class="small-6 columns left">
<a href="#" class="button small submit" />{$lang.l_search}</a>
</div><!-- col -->
</form>
</div><!-- row -->
{if $http_error}
<div class="alert-box alert">
{$http_error}
<a href="#" class="close">&times;</a>
</div>
{/if}
{if !$imdbresults}
<div class="alert-box">
{$lang.l_nothing}
</div>
{/if}
{if $imdbresults}
<h4 class="subheader">{$lang.l_select}</h4>
{if $searchtype == 'image'}
<ul class="small-block-grid-4">
{foreach item=match from=$imdbresults name="col"}
<li>
<a href="javascript:void(returnImage('{$match.coverurl}'))" title="Select">
<img src="{$match.imgsmall}" max-width="90" max-height="60" />
</a>
<div class="small">
{$match.title}
</div>
</li>
{/foreach}
</ul>
{else}
<ul class="no-bullet">
<li>
<ol>
{foreach item=match from=$imdbresults}
<li>
<a href="javascript:void(returnData('{$match.id}','{$match.title|escape:"javascript"|escape}','{$match.subtitle|escape:"javascript"|escape}', '{$engine}'));" title="add ID and close Window">{$match.title}{if $match.subtitle} - {$match.subtitle}{/if}{if $match.year} ({$match.year}){/if}</a>
{if $match.details || $match.imgsmall}
<font size="-2">
{if $match.imgsmall}<img src="{$match.imgsmall}" align="left" width="25" height="35" />{/if}
{$match.details}
</font>
{/if}
</li>
{/foreach}
</ol>
{/if}
</li>
</ul>
{/if}
<div class="right">
<a href="{$searchurl}" class="button small" target="_blank">{$lang.l_selfsearch}</a>
</div>
</div><!-- col -->
</div><!-- row -->
</body>
</html>

View File

@@ -0,0 +1,54 @@
{*
Inline ajax response display
$Id: lookup_ajax.tpl,v 1.1 2013/03/10 16:18:26 andig2 Exp $
*}
<!-- {$smarty.template} -->
{if $searchtype == 'purchase'}
{foreach item=match from=$imdbresults}
<div class="thumbnail" >
<a href="{$match.url}" target="_blank" title="Purchase">
<img src="{$match.imgsmall}" url="{$match.coverurl}" align="left" width="60" height="90" /><br />
{$match.title}{if $match.subtitle} - {$match.subtitle}{/if}
{if $match.sl}({$match.sl}){/if}
{if $match.price}({$match.price}){/if}
</a>
</div>
{/foreach}
{elseif $searchtype == 'download'}
<ul>
{foreach item=match from=$imdbresults}
<li><a href="{$match.url}" target="_blank">{$match.title}</a>{if $match.subtitle} - {$match.subtitle}{/if}
{if $match.plot && 0}<br/>{$match.plot}{/if}
</li>
{/foreach}
</ul>
{elseif $searchtype == 'trailer'}
{foreach item=match from=$imdbresults}
<span>
<object width="425" height="350">
<param name="movie" value="{$match}"></param>
<param name="wmode" value="transparent"></param>
<embed src="{$trailerid}" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed>
</object>
</span>
{/foreach}
{else}
{foreach item=match from=$imdbresults}
<div class="thumbnail" >
<a href="javascript:void(returnImage('{$match.coverurl|escape:"javascript"}'))" url="{$match.coverurl}" title="Select image">
<img src="{$match.imgsmall}" url="{$match.coverurl}" align="left" width="60" height="90" /><br />
{$match.title}
</a>
</div>
{/foreach}
{/if}

View File

@@ -0,0 +1,160 @@
/**
* Nexgen style sheet
*
* $Id: nexgen.css,v 1.9 2013/03/21 16:27:57 andig2 Exp $
*/
/* general styles */
body { background: none repeat scroll 0% 0% white; }
/* make layout fluid */
.row, .th { max-width: 100%; }
.inline { display: inline !important; }
.centered { text-align: center; }
/* forms */
form .row .row { margin: 0px -0.5em; }
textarea.large { height: 8.1em; }
/* IMDB inframe */
iframe {
border: 0px;
width: 100% !important;
height: 100% !important; }
/* multi-column text */
@media only screen {
.small-cols-2, .small-cols-3, .small-cols-4 { -webkit-column-gap: 30px; -moz-column-gap: 30px; }
.small-cols-2 { -webkit-column-count: 2; -moz-column-count: 2; }
.small-cols-3 { -webkit-column-count: 3; -moz-column-count: 3; }
.small-cols-4 { -webkit-column-count: 4; -moz-column-count: 4; } }
@media only screen and (min-width: 48em) {
.large-cols-2, .large-cols-3, .large-cols-4 { -webkit-column-gap: 30px; -moz-column-gap: 30px; }
.large-cols-2 { -webkit-column-count: 2; -moz-column-count: 2; }
.large-cols-3 { -webkit-column-count: 3; -moz-column-count: 3; }
.large-cols-4 { -webkit-column-count: 4; -moz-column-count: 4; } }
/* button groups */
ul.button-group {
display: inline-block; }
/* top-bar forms */
.top-bar input, .top-bar .button { font-size: 0.8125em; }
/* logo */
.top-bar .name h1 a { color: #53d8ff !important; font-family: Exo;}
/* header */
.header {
background-color: rgb(238, 238, 238);
padding: 12px 0px 8px 0px;
margin: -33px 0px 33px 0px; }
.header .button-group {
margin-top: -5px; }
.header .button, .header .sub-nav, .header input {
margin-bottom: 0px; }
/* align alert-box below top-bar similar to header */
.alert-box.sticky { margin-top: -34px; }
/* footer */
footer {
background-color: rgb(43, 166, 203);
background-color: rgb(238, 238, 238);
padding: 12px 0px 12px 0px; }
footer .pagination {
margin: 0px; }
ul.itemlist {
margin: -10px -10px 10px -10px; }
ul.itemlist a div {
color: rgb(43, 43, 43) !important;
font-weight: bold;
font-size: 80%;
text-align: center;
height: 1.6em;
line-height: 2;
overflow: hidden;
opacity: 0.7; }
/* show columns */
.show-cover {
text-align: center; }
.show-cover h2 {
margin: 7px 0px 12px 0px; }
.show-details {
padding-top: 17px; }
.show-details ul { /* actors */
line-height: 1.2 }
/* top bar large dropdown */
.dropdown.large {
padding: 8px 8px 12px 0px;
margin-left: -100px !important;
background: none repeat scroll 0% 0% rgb(43, 43, 43) !important; }
.dropdown.large dl.sub-nav {
margin: 0px 0px 0px 0px;
padding-left: 100px;
width: 900px;
line-height: 1.8; }
.dropdown.large dl.sub-nav dt {
float: left;
clear: left;
width: 100px;
margin-left: -100px;
text-align: right;
color: rgb(153, 153, 153); }
.dropdown.large dl.sub-nav dd a {
padding: 2px 7px 2px 7px !important;
color: rgb(255, 255, 255); }
.dropdown.large dl.sub-nav dd a:hover {
-webkit-border-radius: 1000px;
border-radius: 1000px; }
.dropdown.large dl.sub-nav dd:not(.active):not(:hover) a {
background: none repeat scroll 0% 0% rgb(43, 43, 43) !important; }
/* default sub nav styling */
dl.sub-nav dt, dl.sub-nav dd {
margin-bottom: 2px;
color: rgb(77, 77, 77); }
dl.sub-nav dt a, dl.sub-nav dd a {
padding: 0.1875em 0.5625em;
color: rgb(43, 166, 203); }
dl.sub-nav dd.active a {
background: none repeat scroll 0% 0% rgb(43, 166, 203); }
/* rating style */
dl.sub-nav.tight dd {
margin-left: 0.1875em; }
dl.sub-nav.tight dd:first-child {
margin-left: 0.5625em; }
dl.sub-nav.tight dd:first-child a {
padding: 0.1875em 0.1875em 0.1875em 0.5625em; }
dl.sub-nav.tight dd a {
padding: 0.1875em 0.3em; }
/* Foundation 3 Tabs */
.tabs { list-style: none; border-bottom: solid 1px #e6e6e6; display: block; height: 40px; padding: 0; margin-bottom: 0px; }
.tabs.contained { margin-bottom: 0; margin-left: 0; }
.tabs dt, .tabs li.section-title { color: #b3b3b3; cursor: default; display: block; float: left; font-size: 12px; height: 40px; line-height: 40px; padding: 0; padding-right: 9px; padding-left: 20px; font-weight: normal; width: auto; text-transform: uppercase; }
.tabs dt:first-child, .tabs li.section-title:first-child { padding: 0; padding-right: 9px; }
.tabs dd, .tabs li { display: block; float: left; padding: 0; margin: 0; }
.tabs dd a, .tabs li a { color: #6f6f6f; display: block; font-size: 14px; height: 40px; line-height: 40px; padding: 0px 23.8px; }
.tabs dd a:focus, .tabs li a:focus { font-weight: bold; color: #2ba6cb; }
.tabs dd.active, .tabs li.active { border-top: 3px solid #2ba6cb; margin-top: -3px; }
.tabs dd.active a, .tabs li.active a { cursor: default; color: #3c3c3c; background: #fff; border-left: 1px solid #e6e6e6; border-right: 1px solid #e6e6e6; font-weight: bold; }
.tabs dd:first-child, .tabs li:first-child { margin-left: 0; }

View File

@@ -0,0 +1,72 @@
{*
Setup/profile options template
$Id: options.tpl,v 1.5 2013/03/21 16:27:57 andig2 Exp $
*}
<!-- {$smarty.template} -->
<div class="row">
<div class="small-12 large-10 columns large-centered">
{foreach from=$setup item=option}
{if !empty($option.group)}
<h3 class="subheader">{$lang[$option.group]}</h3>
{else}
<div class="row">
<div class="small-12 large-4 columns">
<label {if $option.type == 'boolean'}for="{$option.name}"{/if}>{$option.hl}</label>
{if $option.type == 'text'}
<input type="text" name="{$option.name}" value="{$option.set|escape}" />
{/if}
{if $option.type == 'boolean'}
{html_checkbox name=$option.name id=$option.name value=1 checked=$option.set}
{/if}
{if $option.type == 'dropdown'}
{html_options name=$option.name options=$option.data selected=$option.set}
{/if}
{if $option.type == 'multi'}
<select name="{$option.name}[]" multiple="multiple">
<option value=""></option>
{html_options options=$option.data selected=$option.set}
</select>
{/if}
{if $option.type == 'special'}
{if $option.name == 'languageflags'}<div class="small-cols-4">{/if}
{$option.data}
{if $option.name == 'languageflags'}</div>{/if}
{/if}
{if $option.type == 'link'}
<a href="{$option.data}">{$option.hl}</a>
{/if}
</div><!-- col -->
<div class="small-12 large-8 columns">
<p>{$option.help}</p>
{if !empty($option.thumbs)}
<ul class="small-block-grid-4">
{foreach item=thumb from=$option.thumbs}
<li>
<a href="{$smarty.server.PHP_SELF}?template={$thumb.name}&quicksave=1">
<img src="{$thumb.img}" />
<span>{$thumb.name}</span>
</a>
</li>
{/foreach}
</ul>
{/if}
</div><!-- col -->
</div><!-- row -->
{/if}
{/foreach}
</div>
</div>

View File

@@ -0,0 +1,64 @@
{*
User permissions template
$Id: permissions.tpl,v 1.2 2013/03/12 19:13:18 andig2 Exp $
*}
<!-- {$smarty.template} -->
<div class="row">
<div class="small-10 columns small-centered">
{if $message}
<div class="alert-box">
{$message}
</div>
{/if}
<h3 class="subheader">{$lang.existingusers}</h3>
<form action="permissions.php" method="post">
<h5 class="subheader">{$lang.selecteduser}</h5>
{html_options name=from_uid options=$owners selected=$from_uid class="autosubmit"}
<h5 class="subheader">{$lang.permtouser}</h5>
<table style="width:100%">
<thead>
<tr>
<th><h5 class="subheader">{$lang.username}</h5></th>
<th><h5 class="subheader">{$lang.read}</h5></th>
<th><h5 class="subheader">{$lang.write}</h5></th>
</tr>
</thead>
<tbody>
{foreach item=perm from=$permlist}
<tr>
<td class="text-centered">
<input type="hidden" name="newflag_{$perm.to_uid}" id="newflag_{$perm.to_uid}" value="{$perm.newentry}" />
{$perm.to_name}
</td>
<td class="text-centered">
<input type="checkbox" name="readflag_{$perm.to_uid}" id="readflag_{$perm.to_uid}" value="1" {if $perm.read}checked="checked"{/if}/>
</td>
<td class="text-centered">
<input type="checkbox" name="writeflag_{$perm.to_uid}" id="writeflag_{$perm.to_uid}" value="1" {if $perm.write}checked="checked"{/if}/>
</td>
</tr>
{/foreach}
</tbody>
</table>
<div class="row">
<div class="small-2 columns small-centered">
<!--
<input type="button" name="back" class="button" value="{$lang.back}" onclick="window.location.href='users.php';" />
-->
<input type="submit" name="save" class="button" value="{$lang.save}" />
</div><!-- col -->
</div><!-- row -->
</form>
</div><!-- col -->
</div><!-- row -->

View File

@@ -0,0 +1,20 @@
{*
User profile template
$Id: profile.tpl,v 1.2 2013/03/12 19:13:18 andig2 Exp $
*}
<!-- {$smarty.template} -->
<form method="post" action="profile.php">
<input type="hidden" name="save" value="1" />
<div class="row header">
<div class="small-12 columns">
<ul class="button-group right">
<a class="button small submit" href="#">{$lang.save}</a>
</ul><!-- nav-bar -->
</div><!-- button-bar -->
</div>
{include file="options.tpl"}
</form>

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -0,0 +1,110 @@
{*
Search template
$Id: search.tpl,v 1.6 2013/03/16 14:29:47 andig2 Exp $
*}
<!-- {$smarty.template} -->
<script type="text/javascript" src="{$template}js/search.js"></script>
{assign var=max_width value=220}
{assign var=max_height value=400}
<form action="search.php" id="search" name="search" method="get">
<div class="row">
{if !empty($imgurl)}
<div class="large-2 columns hide-for-small search-cover">
{assign var=link value=$q|regex_replace:"/&quot;|\"|%22/":""|escape:url}
{assign var=link value="http://www.imdb.com/find?q=$link&s=all"}
{if $config.imdbBrowser}
{assign var="link" value="trace.php?iframe=1&videodburl=$link"}
{/if}
<a href='{$link}' class="th radius">{html_image file=$imgurl max_width=$max_width max_height=$max_height}</a>
</div>
{/if}
<div class="small-12 large-10 columns {if empty($imgurl)}large-centered{/if} search-parameters">
<h4 class="subheader">{$lang.search}</h4>
<div class="row">
<div class="small-12 columns">
<label>{$lang.keywords}</label>
</div><!-- col -->
</div><!-- row -->
<div class="row collapse">
<div class="small-10 columns">
<input type="text" name="q" id="q" value='{$q_q}' />
<div id="item_choices" class="autocomplete" style="display: none"></div>
</div><!-- col -->
<div class="small-2 columns">
<a class="button postfix submit" href="#">{$lang.l_search}</a>
</div><!-- col -->
</div><!-- row -->
<!-- fields -->
<div class="row">
<div class="small-2 large-1 columns">
<dl class="sub-nav">
<dt>Note:</dt>
</dl>
</div><!-- col -->
<div class="small-10 large-11 columns">
<dl class="sub-nav">
<dd>{$lang.keywords_desc}</dd>
</dl>
</div><!-- col -->
</div><!-- row -->
<div class="row">
<div class="small-2 large-1 columns">
<dl class="sub-nav" input-checkbox>
<dt>{$lang.fieldselect}:</dt>
</dl>
</div><!-- col -->
<div class="small-10 {if !empty($owners)}large-7{else}large-11{/if} columns">
<dl class="sub-nav" input-checkbox>
{foreach from=$search_fields key=k item=v}
<dd {if $k|in_array:$selected_fields}class="active"{/if}><a href="fields[]" value="{$k}">{$v|escape}</a></dd>
{/foreach}
</dl>
</div><!-- col -->
{if !empty($owners)}
<div class="small-2 large-1 columns">
<dl class="sub-nav" input-radio>
<dt>{$lang.owner}:</dt>
</dl>
</div><!-- col -->
<div class="small-10 large-3 columns">
<dl class="sub-nav" input-radio>
{foreach from=$owners key=k item=v}
<dd {if $owner==$v}class="active"{/if}><a href="owner" value="{$k}">{$v|escape}</a></dd>
{/foreach}
</dl><!-- sub-nav -->
</div><!-- col -->
{/if}
</div><!-- row -->
<div class="row">
<div class="small-2 large-1 columns">
<dl class="sub-nav" input-checkbox>
<dt>{$lang.genre}:</dt>
</dl>
</div><!-- col -->
<div class="small-10 large-11 columns">
<dl class="sub-nav" input-checkbox>
{foreach $genres as $genre}
<dd {if !empty($genre.checked)}class="active"{/if}><a href="genres[]" value="{$genre.id}">{$genre.name}</a></dd>
{/foreach}
</dl>
</div><!-- col -->
</div><!-- row -->
</div><!-- col -->
</div><!-- row -->
</form>

View File

@@ -0,0 +1,29 @@
{*
Setup template
$Id: setup.tpl,v 1.4 2013/03/16 10:10:07 andig2 Exp $
*}
<!-- {$smarty.template} -->
<form action="setup.php" method="post">
<input type="hidden" name="save" value="1" />
<div class="row header">
<div class="small-12 columns">
<ul class="button-group right">
<a class="button small" href="setup.php?cacheempty=1">{$lang.cacheempty}</a>
<a class="button small submit" href="#">{$lang.save}</a>
</ul><!-- nav-bar -->
</div><!-- button-bar -->
</div>
{if $cacheclear}
<div class="alert-box sticky">
{$lang.msg_cachecleared}
<a href="#" class="close">&times;</a>
</div>
{/if}
{include file="options.tpl"}
</form>

View File

@@ -0,0 +1,355 @@
{*
Show template
$Id: show.tpl,v 1.9 2013/03/21 16:27:57 andig2 Exp $
*}
<!-- {$smarty.template} -->
<script type="text/javascript">
function showTrailer(title) {
open('trailer.php?title=' + escape(title), 'trailer',
'width=500,height=500,menubar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no');
}
{if $config.boxeeHost}
function boxeePlay(id) {
$.getJSON("show.php?method=boxeePlay&id="+id);
}
{/if}
</script>
{assign var=IMGWIDTH value="600"}
{assign var=IMGHEIGHT value="1000"}
<div class="row header">
<div class="small-12 columns">
<div class="right">
<ul class="button-group">
<li><a class="button small {if !$video.copyable}disabled{/if}" href="#" data-reveal-id="delete-modal">{$lang.delete}</a></li>
</ul><!-- button-group -->
<ul class="button-group">
<li><a class="button small {if !$video.copyable}disabled{/if}" href="edit.php?copyid={$video.id}&amp;save=1">{$lang.copy}</a></li>
<li><a class="button small {if !$video.editable}disabled{/if}" href="borrow.php?id={$video.id}&amp;diskid={$video.diskid}">{$lang.borrow}</a></li>
{if !$video.seen}<li><a class="button small seen" href="show.php?id={$video.id}&amp;seen=1">{$lang.seen|lower}</a></li>{/if}
</ul><!-- button-group -->
<ul class="button-group">
<li><a class="button small {if !$video.copyable}disabled{/if}" href="edit.php?id={$video.id}">{$lang.edit}</a></li>
</ul><!-- button-group -->
{if $config.boxeeHost}
<ul class="button-group">
<li><a class="button small {if !$video.filename}disabled{/if}" href="#" onclick="javascipt:boxeePlay({$video.id})">{$lang.play}</a></li>
</ul><!-- button-group -->
{/if}
</div>
<ul class="button-group hide-for-small">
<li><a class="button small secondary {if !$video.prev_id}disabled{/if}" href="show.php?id={$video.prev_id}">&laquo;</a></li>
<li><a class="button small secondary {if !$video.next_id}disabled{/if}" href="show.php?id={$video.next_id}">&raquo;</i></a></li>
</ul><!-- button-group -->
<!--
{if !empty($engines.trailer) || !empty($engines.purchase) || !empty($engines.download)}
<ul class="button-group hide-for-small">
{if !empty($engines.trailer)}<li id="youtube"><a class="button small" href="#" onclick='showTrailer("{$video.title|escape:javascript|escape:html}"); return false;'><i class="foundicon-video"></i></a></li>{/if}
{if !empty($engines.purchase)}<li id="purchase"><a href="#" class="button small" onclick="toggler('purchases');return false;">X</a></li>{/if}
{if !empty($engines.download)}<li id="torrent"><a href="#" class="button small" onclick="toggler('torrents');return false">X</a></li>{/if}
</ul>
{/if}
-->
</div><!-- nav-bar -->
</div>
<div class="row">
<div class="small-12 large-3 columns show-cover">
<h2>{$video.title}</h2>
{if $link && $config.imdbBrowser}
{assign var="link" value=$link|escape:url}
{assign var="link" value="trace.php?iframe=1&amp;videodburl=$link"}
{/if}
{if $video.imgurl}
{html_image file=$video.imgurl link=$link title=$lang.visit max_width=$IMGWIDTH max_height=$IMGHEIGHT}
{/if}
<h3 class="subheader">{$video.subtitle}</h3>
{if $video.diskid}
<h3><a href="search.php?q={$video.diskid}&amp;fields=diskid&amp;nowild=1">&lt;{$video.diskid}&gt;</a></h3>
{/if}
{if !empty($video.who)}
<div class="alert-box">
{$lang.notavail} {$video.who}
</div>
{/if}
</div><!-- col -->
<!-- main block -->
<div class="small-12 large-9 columns show-details">
<h4 class="subheader">{$lang.main_details}</h4>
<div class="row">
<div class="small-12 large-6 columns">
<div class="row"><!-- clear helper -->
<div class="small-6 columns">
<p>{$lang.director}:
{assign var=d value="/\s*,\s*/"|preg_split:$video.director}
{foreach $d as $director name=loop}
<a href="search.php?q=%22{$director|escape:url}%22&amp;isname=1">{$director}</a>{if $smarty.foreach.loop.index < $smarty.foreach.loop.total-1}, {/if}
{/foreach}
</p>
</div><!-- col -->
<div class="small-6 columns">
<p>{$lang.year}:
{if $video.year}<a href="search.php?q={$video.year}&amp;fields=year&amp;nowild=1">{$video.year}</a>{/if}
</p>
</div><!-- col -->
</div><!-- col -->
</div><!-- row -->
<div class="small-12 large-6 columns">
<div class="row"><!-- clear helper -->
<div class="small-6 columns">
<p>{$lang.country}:
{foreach $video.country as $country name=loop}
<a href="search.php?q=%22{$country|escape:url}%22&amp;fields=country">{$country}</a>{if $smarty.foreach.loop.index < $smarty.foreach.loop.total-1}, {/if}
{/foreach}
</p>
</div><!-- col -->
<div class="small-6 columns">
<p>{$lang.runtime}: {if $video.runtime}{$video.runtime}min{/if}</p>
</div><!-- col -->
</div><!-- row -->
</div><!-- col -->
</div><!-- row -->
<div class="row">
<div class="small-12 large-6 columns">
<div class="row"><!-- clear helper -->
<div class="small-6 columns">
<p>{$lang.genres}:
{foreach $genres as $genre name=loop}
<a href="search.php?q=&amp;genres[]={$genre.id}">{$genre.name}</a>{if $smarty.foreach.loop.index < $smarty.foreach.loop.total-1}, {/if}
{/foreach}
</p>
</div><!-- col -->
<div class="small-6 columns">
<p>{$lang.language}:
{foreach $video.language as $language name="loop"}
<a href="search.php?q=%22{$language|escape:url}%22&amp;fields=language">{$language|capitalize}</a>{if $smarty.foreach.loop.index < $smarty.foreach.loop.total-1}, {/if}
{/foreach}
</p>
</div><!-- col -->
</div><!-- col -->
</div><!-- row -->
<div class="small-12 large-6 columns">
<div class="row"><!-- clear helper -->
<div class="small-6 columns">
<p>{$lang.mediatype}:
<a href="search.php?q=%22{$video.mediatype|escape:url}%22&amp;fields=mediatype&amp;nowild=1">{$video.mediatype}</a>
</p>
</div><!-- col -->
<div class="small-6 columns">
<p>{$lang.rating}: {if $video.rating}{$video.rating}{/if}</p>
</div><!-- col -->
</div><!-- row -->
</div><!-- col -->
</div><!-- row -->
<div class="row">
{if !empty($video.owner)}
<div {if $video.istv || $video.seen || !empty($video.3d)}class="small-6 large-3 columns"{else}class="small-12 large-12 columns"{/if}>
<p>{$lang.owner}: <a href="search.php?q={$video.owner|escape:url}&amp;fields=owner&amp;nowild=1">{$video.owner}</a>
{if $loggedin && $video.email && $video.owner != $loggedin && $video.who == '' && $video.diskid}
<a href="javascript:void(open('borrowask.php?id={$video.id|escape:url}&amp;diskid={$video.diskid|escape:url}','borrowask','width=300,height=300,menubar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no'))" class="button tiny">{$lang.borrowask}</a>
{/if}
</p>
</div><!-- col -->
{/if}
{if $video.istv || $video.seen || !empty($video.3d)}
<div {if !empty($video.owner)}class="small-6 large-9 columns"{else}class="small-12 large-12 columns"{/if}>
{if $video.istv}
<dl class="sub-nav inline" input-checkbox>
<dd {if $video.istv}class="active"{/if}><a href="istv" value="1">{$lang.tvepisode}</a></dd>
</dl>
{/if}
{if $video.seen}
<dl class="sub-nav inline" input-checkbox>
<dd {if $video.seen}class="active"{/if}><a href="seen" value="1">{$lang.seen}</a></dd>
</dl>
{/if}
{if !empty($video.3d)}
<dl class="sub-nav inline" input-checkbox>
<dd {if !empty($video.3d)}class="active"{/if}><a href="3d" value="1">{$lang.3d}3D</a></dd>
</dl>
{/if}
</div><!-- col -->
{/if}
</div><!-- row -->
{if $video.plot}
<h4 class="subheader">{$lang.synopsis}</h4>
<div class="row">
<div class="small-12 columns">
<div {if $video.plot|strlen > 200}class="small-cols-1 large-cols-3"{/if}>
<p>{$video.plot|escape}</p>
</div><!-- col -->
</div><!-- col -->
</div><!-- row -->
{/if}
{if $video.filename}
<h4 class="subheader">{$lang.file_details}</h4>
<div class="row">
<div class="small-6 large-4 columns">
<p>{$lang.filename}: {$video.filename}</p>
</div><!-- col -->
<div class="small-6 large-4 columns">
<p>{$lang.filesize}: {if $video.filesize}{$video.filesize}mb{else}-{/if}</p>
</div><!-- col -->
<div class="small-6 large-4 hide-for-small columns">
<p>{$lang.filedate}: {if $video.filedate}{$video.filedate}{else}-{/if}</p>
</div><!-- col -->
</div><!-- row -->
<div class="row hide-for-medium-up">
<div class="small-6 columns">
<p>{$lang.filedate}: {if $video.filedate}{$video.filedate}{else}-{/if}</p>
</div><!-- col -->
<div class="small-6 columns">
<p>{$lang.dimension}: {$video.video_width}x{$video.video_height}</p>
</div><!-- col -->
</div><!-- row -->
<div class="row">
<div class="small-6 large-4 columns">
<p>{$lang.audiocodec}:
<a href="search.php?q=%22{$video.audio_codec|escape:url}%22&amp;fields=audio_codec&amp;nowild=1">{if $video.audio_codec}{$video.audio_codec|escape}{else}-{/if}</a>
</p>
</div><!-- col -->
<div class="small-6 large-4 columns">
<p>{$lang.videocodec}:
<a href="search.php?q=%22{$video.video_codec|escape:url}%22&amp;fields=video_codec&amp;nowild=1">{if $video.video_codec}{$video.video_codec|escape}{else}-{/if}</a>
</p>
</div><!-- col -->
<div class="small-6 large-4 hide-for-small columns">
<p>{$lang.dimension}: {$video.video_width}x{$video.video_height}</p>
</div><!-- col -->
</div><!-- row -->
{/if}
{if $video.comment}
<h4 class="subheader">{$lang.comment}</h4>
<div class="row">
<div class="small-12 columns">
<p>{$video.comment|escape}</p>
</div><!-- col -->
</div><!-- row -->
{/if}
{if !empty($video.custom1name) || !empty($video.custom2name) || !empty($video.custom3name) || !empty($video.custom4name)}
<h4 class="subheader">{$lang.custom_details}</h4>
<div class="row">
<div class="small-12 columns">
<ul class="small-block-grid-4">
{if !empty($video.custom1name)}
<li>{$video.custom1name}: {$video.custom1out}</li>{/if}
{if !empty($video.custom2name)}
<li>{$video.custom2name}: {$video.custom2out}</li>{/if}
{if !empty($video.custom3name)}
<li>{$video.custom3name}: {$video.custom3out}</li>{/if}
{if !empty($video.custom4name)}
<li>{$video.custom4name}: {$video.custom4out}</li>{/if}
</ul>
</div><!-- col -->
</div><!-- row -->
{/if}
{if $video.cast|@count || $cast_toggle}
<h4 class="subheader">{$lang.cast}</h4>
<div class="row">
{if $cast_toggle}
{if $show_cast}
<a href="show.php?id={$video.id}" class="button submit">{$lang.hidecast}</a>
{else}
<a href="show.php?id={$video.id}&amp;show_cast=1" class="button submit">{$lang.showcast}</a>
{/if}
{/if}
{if $show_cast}
<div class="small-12 columns">
<ul class="small-block-grid-1 large-block-grid-4">
{foreach $video.cast as $actor name=col}
<li>
<div class="row collapse">
<div class="small-4 columns">
{if $actor.imgurl}
{assign var="link" value=$actor.imdburl}
{if $config.imdbBrowser}
{assign var="link" value=$link|escape:url}
{assign var="link" value="trace.php?iframe=1&amp;videodburl=$link"}
{/if}
<a href="{$link}">{html_image file=$actor.imgurl max_width=60 max_height=90}</a>
{/if}
</div>
<div class="small-8 columns">
<a href="search.php?q=%22{$actor.name|escape:url}%22&amp;isname=1">{$actor.name}</a>
{foreach $actor.roles as $role name="loop"}<br/>{$role}{/foreach}
</div>
</div>
</li><!-- col -->
{/foreach}
</ul><!-- row -->
</div><!-- col -->
{/if}
</div><!-- row -->
{/if}
</div><!-- col -->
</div><!-- row -->
<!-- modal dialogs -->
<div id="delete-modal" class="reveal-modal large">
<form action="delete.php" method="post">
<input type="hidden" name="redirect" value="1" />
<input type="hidden" name="id" value="{$video.id}" />
<div class="row">
<div class="small-3 columns">
{if $video.imgurl}
{html_image file=$video.imgurl link=$link title=$lang.visit max_width=$IMGWIDTH max_height=$IMGHEIGHT}
{/if}
</div>
<div class="small-9 columns">
<h2>{$video.title}</h2>
<p class="lead">{$lang.delete_movie}</p>
<a href="#" class="button submit">{$lang.delete}</a>
<a class="button close-modal">{$lang.cancel}</a>
<a class="close-reveal-modal">&#215;</a>
</div>
</div>
</form>
</div>

View File

@@ -0,0 +1,151 @@
{*
Statistics template
$Id: stats.tpl,v 1.4 2013/03/13 15:27:16 andig2 Exp $
*}
<!-- {$smarty.template} -->
<div class="row">
<div class="small-12 large-10 columns small-centered">
<h3 class="subheader">{$lang.statistics}</h3>
{if !empty($owners)}
<h6 class="subheader">{$lang.statistics_for}</h6>
<form action="stats.php">
{html_options name=owner options=$owners selected=$owner class="autosubmit"}
</form>
{/if}
<div class="row">
<div class="small-12 large-6 columns">
<table class="small-12">
<tr>
<td><h6 class="subheader">{$lang.totalfiles}:</h6></td>
<td>{$stats.count_all}</td>
</tr>
<tr>
<td><h6 class="subheader">{$lang.tv_episodes}:</h6></td>
<td><a href="search.php?q=1&fields=istv">{$stats.count_tv}</a></td>
</tr>
<tr>
<td><h6 class="subheader">{$lang.numberdisks}:</h6></td>
<td>{$stats.count_disk}</td>
</tr>
<tr>
<td><h6 class="subheader">{$lang.videobygen}:</h6>{$lang.multiple}</td>
<td>
<div class="small-cols-1 large-cols-2">
<ul>
{foreach item=row from=$stats.count_genre}
<li>{$row.count} <a href="search.php?q=&genres[]={$row.id}">{$row.name}</a></li>
{/foreach}
</ul>
</div>
</td>
</tr>
<tr>
<td><h6 class="subheader">{$lang.year}:</h6></td>
<td>
<table class="small-12">
<tr>
<td valign="bottom"><small>{$stats.first_year|spacify:"<br/>"}</small></td>
<td colspan="2" valign="bottom">
{foreach key=year item=count from=$stats.count_year}<a href="search.php?q={$year}&amp;fields=year&amp;nowild=1"><img src="images/bar.gif" style="width:7px; height:{if $count==0}0{else}{math equation='max(round(100/y*x),1)' x=$count y=$stats.max_count}{/if}px;" title="{$year}: {$count}" alt="{$year}: {$count}" /></a>{/foreach}
</td>
<td><small>{$stats.last_year|spacify:"<br/>"}</small></td>
</tr>
</table>
</td>
</tr>
</table>
</div><!-- col -->
<div class="small-12 large-6 columns">
<table class="small-12">
<tr>
<td><h6 class="subheader">{$lang.averageruntime}:</h6></td>
<td>{$stats.avg_time} min</td>
</tr>
<tr>
<td><h6 class="subheader">{$lang.totalruntime}:</h6></td>
<td>{$stats.sum_time} h</td>
</tr>
<tr>
<td><h6 class="subheader">{$lang.totalseen}:</h6></td>
<td>{$stats.seen_time} h</td>
</tr>
<tr>
<td><h6 class="subheader">{$lang.languages}:</h3></td>
<td>
<div class="small-cols-1 large-cols-2">
<ul>
{foreach item=row from=$stats.count_lang}
{if $row.language}
<li>{$row.count} <a href="search.php?q={$row.language|escape:url}&amp;fields=language">{$row.language}</a></li>
{/if}
{/foreach}
</ul>
</div>
</td>
</tr>
<tr>
<td><h6 class="subheader">{$lang.videobymedia}:</h6></td>
<td>
<div class="small-cols-1 large-cols-2">
<ul>
{foreach item=row from=$stats.count_media}
<li>{$row.count} <a href="search.php?q='{$row.name|escape:url}'&amp;fields=mediatype&amp;nowild=1">{$row.name}</a></li>
{/foreach}
</ul>
</div>
</td>
</tr>
<tr>
<td><h6 class="subheader">{$lang.averagefilesize}:</h6></td>
<td>{$stats.avg_size} mb</td>
</tr>
<tr>
<td><h6 class="subheader">{$lang.totalsize}:</h6></td>
<td>{$stats.sum_size} gb</td>
</tr>
<tr>
<td><h6 class="subheader">{$lang.videobyvcodec}:</h3></td>
<td>
<div class="small-cols-1 large-cols-2">
<ul>
{foreach item=row from=$stats.count_vcodec}
{if $row.video_codec}
<li>{$row.count} <a href="search.php?q={$row.video_codec|escape:url}&amp;fields=video_codec&amp;nowild=1">{$row.video_codec}</a></li>
{/if}
{/foreach}
</ul>
</div>
</td>
</tr>
<tr>
<td><h6 class="subheader">{$lang.videobyacodec}:</h3></td>
<td>
<div class="small-cols-1 large-cols-2">
<ul>
{foreach item=row from=$stats.count_acodec}
{if $row.audio_codec}
<li>{$row.count} <a href="search.php?q={$row.audio_codec|escape:url}&amp;fields=audio_codec&amp;nowild=1">{$row.audio_codec}</a></li>
{/if}
{/foreach}
</ul>
</div>
</td>
</tr>
</table>
</div><!-- col -->
</div><!-- row -->
</div><!-- col -->
</div><!-- row -->

View File

@@ -0,0 +1,21 @@
{*
Trace template
$Id: trace.tpl,v 1.3 2013/03/12 19:13:18 andig2 Exp $
*}
<!-- {$smarty.template} -->
<script>$("html").css("height", "100%");$("body").css("height", "100%");</script>
<div class="row header">
<div class="small-12 columns">
<ul class="button-group right">
<li><a href="{$url}" class="button small" target="_blank">Open in Browser</a></li>
<li><a href="trace.php?iframe=1&videodburl={$url}&videodbreload=1" class="button small submit" />Reload</a></li>
</ul>
</div>
</div>
<div style="height:100%">
<iframe seamless="seamless" src="trace.php?iframe=2&videodburl={$url}"></iframe>
</div>

View File

@@ -0,0 +1,132 @@
{*
Users template
$Id: users.tpl,v 1.6 2013/03/21 16:27:57 andig2 Exp $
*}
<!-- {$smarty.template} -->
<div class="row">
<div class="small-12 large-10 columns small-centered">
{if $message}
<div class="alert-box {if $alert}alert{/if}">
{$message}
<a href="#" class="close">&times;</a>
</div>
{/if}
<h3 class="subheader">{$lang.createuser}</h3>
<form action="users.php" method="post">
<input type="hidden" name="newuser" value="1" />
<div class="panel">
<div class="row">
<div class="small-12 large-6 columns">
<label>{$lang.username}
<input type="text" name="name" class="autofocus" /></label>
</div><!-- col -->
<div class="small-12 large-6 columns">
<label>{$lang.password}
<input type="text" name="password" /></label>
</div><!-- col -->
<div class="small-12 large-6 columns">
<label>{$lang.email}
<input type="text" name="email" /></label>
</div><!-- col -->
<div class="small-12 large-6 columns">
<label>{$lang.permissions}</label>
<dl class="sub-nav" input-checkbox>
<dd><a href="readflag" value="1">{$lang.perm_readall}</a></dd>
<dd><a href="writeflag" value="1">{$lang.perm_writeall}</a></dd>
<dd><a href="adultflag" value="1">{$lang.perm_adult}</a></dd>
<dd><a href="adminflag" value="1">{$lang.perm_admin}</a></dd>
</dl>
</div><!-- col -->
</div><!-- row -->
<div class="row">
<div class="small-2 columns small-centered">
<a href="#" class="button submit">{$lang.create}</a>
</div><!-- col -->
</div><!-- row -->
</div>
</form>
<h3 class="subheader">{$lang.existingusers}</h3>
{foreach item=user from=$userlist}
<h5 class="subheader">{$user.name}</h5>
<form action="users.php" method="post" id="{$user.id}">
<input type="hidden" name="id" value="{$user.id}" />
<div class="row">
<div class="small-4 columns">
<label>{$lang.username}
<input type="text" name="name" value="{$user.name}" /></label>
</div>
<div class="small-5 columns">
{if !$user.guest}
<label>{$lang.password}
<input type="text" name="password" /></label>
{/if}
</div>
<div class="small-3 columns">
<label>{$lang.action}</label>
<a href="#" class="button small submit">{$lang.update}</a>
{if !$user.guest}
<a href="#" class="button small" data-reveal-id="delete-modal-{$user.id}"/>{$lang.delete}</a>
{/if}
</div>
</div>
<div class="row">
<div class="small-4 columns">
{if !$user.guest}
<label>{$lang.email}
<input type="text" name="email" value="{$user.email|escape}" /></label>
{/if}
</div>
<div class="small-5 columns">
<label>{$lang.permissions}</label>
<dl class="sub-nav" input-checkbox>
<dd {if $user.read}class="active"{/if}><a href="readflag" value="1">{$lang.perm_readall}</a></dd>
<dd {if $user.write}class="active"{/if}><a href="writeflag" value="1">{$lang.perm_writeall}</a></dd>
<dd {if $user.adult}class="active"{/if}><a href="adultflag" value="1">{$lang.perm_adult}</a></dd>
<dd {if $user.admin}class="active"{/if}><a href="adminflag" value="1">{$lang.perm_admin}</a></dd>
</dl>
</div>
<div class="small-3 columns">
<form action="permissions.php" method="post">
<input type="hidden" name="from_uid" value="{$user.id}" />
<a href="#" class="button small submit">{$lang.perm}</a>
</form>
</div>
</div>
</form>
{/foreach}
</div><!-- col -->
</div><!-- row -->
<!-- modal dialogs -->
{foreach item=user from=$userlist}
<div id="delete-modal-{$user.id}" class="reveal-modal medium">
<form action="users.php" method="post">
<input type="hidden" name="del" value="{$user.id}" />
<h2>{$user.name}</h2>
<p class="lead">{$lang.delete_user}</p>
<a href="#" class="button submit">{$lang.delete}</a>
<a class="button close-modal">{$lang.cancel}</a>
<a class="close-reveal-modal">&#215;</a>
</form>
</div>
{/foreach}

View File

@@ -0,0 +1,32 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<!--[if lt IE 7]><html class="lt-ie9 lt-ie8 lt-ie7" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><![endif]-->
<!--[if IE 7]><html class="lt-ie9 lt-ie8" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><![endif]-->
<!--[if IE 8]><html class="lt-ie9" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><![endif]-->
<!--[if gt IE 8]><!--><html xmlns="http://www.w3.org/1999/xhtml"><!--<![endif]-->
<head>
<title>videoDB{if $title} - {$title}{/if}</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<meta name="description" content="VideoDB" />
<link rel="shortcut icon" type="image/ico" href="images/icons/1-favicon.ico" />
{if !empty($rss)}<link rel="alternate" type="application/rss+xml" title="VideoDB RSS" href="index.php?export=rss" />{/if}
<!-- css -->
<link rel="stylesheet" type="text/css" href="lib/foundation4/css/normalize.css" />
<link rel="stylesheet" type="text/css" href="lib/foundation4/css/foundation.min.css" />
<link rel="stylesheet" type="text/css" href="lib/foundation4/fonts/general_foundicons.css" />
<link rel="stylesheet" type="text/css" href="{$style}" />
<!--[if lt IE 9]><link rel="stylesheet" type="text/css" href="lib/foundation4/css/ltie9.css" /><![endif]-->
<link rel='stylesheet' href='http://fonts.googleapis.com/css?family=Exo:600' type='text/css'>
<!-- js -->
<!-- for now, we're only using jquery, no zepto -->
<script>document.write('<script src="lib/foundation4/js/vendor/' + ('__proto__' in {} ? 'jquery' : 'jquery') + '.js"><\/script>');</script>
<script type="text/javascript" src="javascript/jquery.lazyload.min.js"></script>
<script type="text/javascript" src="lib/foundation4/js/vendor/custom.modernizr.js"></script>
<script type="text/javascript" src="lib/foundation4/js/foundation.min.js"></script>
<script type="text/javascript" src="{$template}js/app.js"></script>
{literal}<script>$(document).ready(function(){$(document).foundation()});</script>{/literal}
</head>