Ejemplo n.º 1
0
 public function video($page = "video")
 {
     //$this->output->cache(15);
     $uri = $this->uri->segment(2);
     $videoId = getIdFromUri($uri);
     $video = $this->Video_model->getByIdFull($videoId);
     $data = array();
     if ($video) {
         $data['video'] = $video;
         $data['server_type'] = $this->_config['server_type'];
         $seriesId = $video['series_id'];
         $series = $this->Series_model->getByIdFull($seriesId);
         $videosOfSeries = $this->Video_model->getRange("series_id=" . $seriesId, 0, 0, 'episode DESC');
         $randomGenreId = $series['genre'] ? array_rand($series['genre']) : 0;
         $suggestSeriesList = $this->Series_model->listSeriesByGenre($randomGenreId, 0, 8, TRUE, $seriesId);
         $data['videoOfSeries'] = $videosOfSeries;
         //echo "<pre>"; print_r($videosOfSeries); die();
         $data['suggestSeriesList'] = $suggestSeriesList;
         $data['randomGenre'] = $randomGenreId ? array('id' => $randomGenreId, 'name' => $series['genre'][$randomGenreId]) : array();
         $this->layout->title($video['title']);
         $metaData['description'] = getVideoDescription($video);
         $metaData['page_link'] = makeLink($video['id'], $video['title'], 'video');
         $metaData['image'] = getThumbnail($series['thumbnail'], 'series');
         $this->layout->setMeta($metaData);
         $this->layout->view('video/' . $page, $data);
     } else {
         $this->layout->view('home/nodata', array());
     }
 }
Ejemplo n.º 2
0
function thumbnail($obj, $size = null, $link = false, $pattern = '<div class="post-cover"><a href="{permalink}" title="{title}" style="background-image:url({image})"></a></div>')
{
    $image = getThumbnail($obj->content, $size);
    if (empty($image)) {
        return;
    }
    if ($link) {
        return $image;
    }
    echo str_replace(array('{title}', '{image}', '{permalink}'), array($obj->title, $image, $obj->permalink), $pattern);
}
Ejemplo n.º 3
0
</strong> results</p>
      </div>
      <?php 
if ($listObject) {
    ?>
        <?php 
    foreach ($listObject as $object) {
        ?>
        <div class="ui-list-item">
          <div class="thumb">
            <a href="<?php 
        echo makeLink($object['id'], $object['title'], 'series', $object['country']);
        ?>
">
              <img src="<?php 
        echo getThumbnail($object['thumbnail'], 'series');
        ?>
" alt="<?php 
        echo $object['title'];
        ?>
" class="img-responsive">
            </a>
          </div><!-- /.thumb -->
          <div class="meta">
            <h3 class="title"><a href="<?php 
        echo makeLink($object['id'], $object['title'], 'series', $object['country']);
        ?>
"><?php 
        echo $object['title'];
        ?>
</a></h3>
Ejemplo n.º 4
0
/**
 * Assigns the videoinfos to the smarty engine
 *
 * @param   array   associative array containing the item data
 */
function tpl_show($video)
{
    global $smarty, $config;
    // imageurl
    $video['imgurl'] = getThumbnail($video['imgurl'], $video['title']);
    // make soft linebreaks:
    $video['filename'] = preg_replace('/(_|\\.|-)/', '$1<wbr />', $video['filename']);
    // split comma-separated countries, prevent empty array
    $video['country'] = preg_split('/,\\s*/', $video['country'], -1, PREG_SPLIT_NO_EMPTY);
    // split comma-separated multiple languages, prevent empty array
    $video['language'] = preg_split('/,\\s*/', $video['language'], -1, PREG_SPLIT_NO_EMPTY);
    // humanreadable filesize:
    $video['filesize'] = round($video['filesize'] / (1024 * 1024), 2);
    // break plot and comment
    $video['plot'] = nl2br($video['plot']);
    $video['comment'] = nl2br($video['comment']);
    // cast
    $video['cast'] = prepare_cast($video['actors']);
    // prepare the custom fields
    customfields($video, 'out');
    // hide owner if not using multi-user
    if (!$config['multiuser']) {
        unset($video['owner']);
    }
    // get drilldown url for image
    if ($video['imdbID']) {
        require_once './engines/engines.php';
        $smarty->assign('link', engineGetContentUrl($video['imdbID'], engineGetEngine($video['imdbID'])));
    }
    // add episodes information
    if (is_array($video['episodes'])) {
        // allow multiple columns
        $smarty->assign('listcolumns', session_get('listcolumns'));
    }
    $smarty->assign('castcolumns', $config['castcolumns']);
    $smarty->assign('video', $video);
    // get genre ids and names
    $smarty->assign('genres', getItemGenres($video['id'], true));
    //2015-10-6 Alex ADD start
    // get studio ids and names
    $smarty->assign('studios', getItemStudios($video['id'], true));
    //2015-10-6 Alex ADD end
    // make engines available
    $smarty->assign('engines', $config['engine']);
    // allow XML export
    foreach (array('xls', 'pdf', 'xml') as $export) {
        if ($config[$export]) {
            $smarty->assign($export, 'show.php?id=' . $video['id'] . '&amp;');
        }
    }
    // new-style way of exporting
    // $smarty->assign('exports', listExports('show.php?id='.$video['id'].'&amp;'));
}
Ejemplo n.º 5
0
<?php

if ($data && isset($data['items'])) {
    $items = $data['items'];
    ?>
  <div class="row">
    <div class="col-sm-12">
      <div class="slider">
        <?php 
    foreach ($items as $itemId => $item) {
        ?>
        <div class="item"><a href="<?php 
        echo $item['item_link'];
        ?>
"><img src="<?php 
        echo getThumbnail($item['item_thumbnail'], 'editor');
        ?>
" alt="<?php 
        echo $item['item_text'];
        ?>
"></a></div><!-- /.item -->
        <?php 
    }
    ?>
      </div><!-- /.slider -->
    </div><!-- /.col-sm-12 -->
  </div><!-- /.row -->
<?php 
}
Ejemplo n.º 6
0
    foreach ($dataArr as $dataChunk) {
        ?>
      <div class="section-line">
        <div class="row pm-row">
        <?php 
        foreach ($dataChunk as $data) {
            ?>
          <div class="col-sm-3">
            <div class="item-video">
              <div class="ui-thumb">
                <a href="<?php 
            echo makeLink($data['id'], $data['title'], 'series', $data['country']);
            ?>
">
                  <img src="<?php 
            echo getThumbnail($data['thumbnail'], 'series');
            ?>
" alt="<?php 
            echo $data['title'];
            ?>
" class="img-responsive" />
                  <span class="fa fa-play-circle-o"></span>
                </a>
              </div><!-- /.ui-thumb -->
              <div class="ui-meta">
                <h3 class="ui-title"><a href="<?php 
            echo makeLink($data['id'], $data['title'], 'series', $data['country']);
            ?>
" class="ui-ellipsis-2"><?php 
            echo $data['title'];
            ?>
    err('Šis profilis neegzistuoja');
    return;
}
echo '<div class="poreikis_left inline">';
// User description
echo '<div class="wrap">';
getThumbnail('user', $id);
echo '<div class="thumb_desc wide">';
echo '<h2>' . $pagerow['user_fname'] . ' ' . $pagerow['user_lname'] . '</h2>';
echo '<b>Tinklo atstovas</b>';
echo '<br>Gyvena ' . $citiesList[$pagerow['user_city']];
echo '<br>Telefonas +' . $pagerow['user_phone'];
echo '<div class="desc">' . $pagerow['user_desc'] . '</div>';
echo '<div class="desc">Profilis sukurtas ' . $pagerow['user_registration_datetime'] . '</div>';
echo '</div>';
echo '</div>';
// User description end
echo '</div><!-- poreikis_left -->';
echo '<div class="poreikis_right inline">';
echo '<h2>Tinklo atstovui priskirti kuratoriai</h2>';
echo '<ul class="user_list">';
foreach (listData(false, false, false, "SELECT * FROM users WHERE user_active = 1 AND user_acctype = 1 AND user_parent = {$id}") as $data) {
    echo '<li><a href="/kuratorius/' . $data['user_id'] . '">';
    getThumbnail('user', $data['user_id']);
    echo '<div class="thumb_desc wide">';
    echo $data['user_fname'] . ' ' . $data['user_lname'];
    echo '</div>';
    echo '</a></li>';
}
echo '</ul>';
echo '</div><!-- poreikis_right -->';
Ejemplo n.º 8
0
$emisor_mail = $_POST['emisor_mail'];
$emisor_mensaje = $_POST['emisor_mensaje'];
$url_id = $_POST['id'];
$video_id = $_POST['video_id'];
$receptor_name = $_POST['receptor_name'];
$receptor_mail = $_POST['receptor_mail'];
//FIN datos
function getThumbnail($video_id)
{
    $rpta = "<a href=\"{$url_id}\"><img src=\"http://img.youtube.com/vi/{$video_id}/hqdefault.jpg\" width=\"300\" height=\"224\" />";
    return $rpta;
}
$images = getThumbnail($video_id);
echo $images;
//$body = file_get_contents('http://vimeo.com/');
$mensaje = "<b>Mensaje:</b><br/>" . getThumbnail($url_id);
$mensaje .= $emisor_mensaje;
$mensaje .= "<br/><b>visita:</b><br/> <a href=\"{$url_id}\">{$url_id}</a>";
$mail = new PHPMailer();
$mail->From = $emisor_mail;
$mail->FromName = $emisor_name;
$mail->Subject = $emisor_mail . " Te envio una dedicatoria";
$mail->Body = $body . $mensaje;
$mail->IsHTML(true);
//$mail->AddAttachment('images/e.png');
$mail->AddAddress($receptor_mail, $receptor_name);
if ($mail->Send()) {
    echo 'MAIL FUE ENVIADO!';
} else {
    echo 'ERRORR error enviar o mail' . $mail->ErrorInfo;
}
Ejemplo n.º 9
0
			</tr>
      <tr>
				<td>Episode</td>
				<td><?php 
echo empty($episode) ? '' : $episode;
?>
</td>
			</tr>
      <tr>
				<td>Image (of Series)</td>
        <td>
          <?php 
if ($series) {
    ?>
          <img width="100" src="<?php 
    echo getThumbnail($series['thumbnail'], 'series');
    ?>
">
          <?php 
}
?>
        </td>
			</tr>
      <tr>
				<td>Genre (of Series)</td>
        <td>
          <?php 
if ($series) {
    ?>
          <?php 
    if ($series['genre']) {
Ejemplo n.º 10
0
function createImage( $item, $data_field, $suffix = '' )
{
	$defs = array
	(
		array('ext'=>'tiny','height'=>30,'crop'=>false)
	);

	if( is_null( $item[ $data_field ] ) || empty( $item[ $data_field ] ) ) return;
	
	$orig = imagecreatefromstring( $item[ $data_field ] );
	
	$width_orig = imagesx($orig);
	$height_orig = imagesy($orig);
	
	foreach($defs as $def)
	{
		$w = $def['width'];
		$h = $def['height'];
		$ext = $def['ext'];
		$crop = $def['crop'];
		
		$dims = getSize( $width_orig, $height_orig, $w, $h, true );
		
		$new_width  = $dims['w'];
		$new_height = $dims['h'];
		
		if( $crop || $w == $h )
		{
			$thumb = getThumbnail( $orig, $w, $crop );
		}
		else
		{
			$thumb = imagecreatetruecolor( $new_width, $new_height );
			imagecopyresampled( $thumb, $orig, 0, 0, 0, 0, $new_width, $new_height, $width_orig, $height_orig );
		}
		
		$path = 'images/notes/' . $item['id'] . '_' . $ext . $suffix . '.jpg';
		
		if( imagejpeg($thumb, WEB_ROOT . $path, 100) )
		{
			imagedestroy($thumb);
			
			echo "<img src='../../" . $path . "' /><br/>";
		}
	}
}
Ejemplo n.º 11
0
			$thumbnails[] = array("node_id"=>$file->getNodeId(), "filename"=>$filename, "value_id"=>$value_id, "width"=>$maxsize_big, "height"=>$maxsize_big, "angle"=>$angle);
		}
			
		if (!checkThumbnailExists($value_id, $maxsize_small, $maxsize_small))
		{
			$thumbnails[] = array("node_id"=>$file->getNodeId(), "filename"=>$filename, "value_id"=>$value_id, "width"=>$maxsize_small, "height"=>$maxsize_small, "angle"=>$angle);
		}
	}
}

echo "Will now create ".count($thumbnails)." thumbnails\n";flush();

foreach ($thumbnails as $thumbnail)
{
	$start_time = time();
	getThumbnail($thumbnail['value_id'], $thumbnail['width'], $thumbnail['height'], $thumbnail['angle']);
	$time = time()-$start_time;
	$count++;
	echo "[$count/".count($thumbnails)."] Successfully created thumbnail for ".$thumbnail['filename']." (NodeID ".$thumbnail['node_id'].") (Size ".$thumbnail['width'].") Time: $time second(s)\n";flush();
}

echo "Created $count thumbnails\n";flush();
echo "\n";flush();


echo "Running optimize on database\n";flush();

$result = mysql_list_tables($mysql_db);
for ($i = 0; $i < mysql_num_rows($result); $i++)
{
	$name = mysql_tablename($result, $i);
Ejemplo n.º 12
0
  <th></th>
</thead>

<?php 
if (!empty($listObject)) {
    ?>
  <?php 
    foreach ($listObject as $i => $object) {
        ?>
    <tr>
      <td><?php 
        echo $i + 1 + $offset;
        ?>
</td>
      <td><img height="100" src="<?php 
        echo getThumbnail($object['item_thumbnail'], 'editor');
        ?>
"></td>
      <td><?php 
        echo $object['item_text'];
        ?>
</td>
      <td><?php 
        echo $object['item_link'];
        ?>
</td>
      <td><?php 
        echo $object['order'];
        ?>
</td>
      <td><a href="<?php 
Ejemplo n.º 13
0
/**
 * Export XML data
 *
 * @param   string  $where  WHERE clause for SQL statement
 */
function xmlexport($WHERE)
{
    global $config;
    // get data
    $result = exportData($WHERE);
    // do adultcheck
    if (is_array($result)) {
        $result = array_filter($result, create_function('$video', 'return adultcheck($video["id"]);'));
    }
    $xml = '';
    // loop over items
    foreach ($result as $item) {
        $xml_item = '';
        // loop over attributes
        foreach ($item as $key => $value) {
            if (!empty($value)) {
                if ($key != 'owner_id' && $key != 'actors') {
                    $tag = strtolower($key);
                    $xml_item .= createTag($tag, trim(html_entity_decode_all($value)));
                }
            }
        }
        // this is a hack for exporting thumbnail URLs
        if ($item['imgurl'] && $config['xml_thumbnails']) {
            $thumb = getThumbnail($item['imgurl']);
            if (preg_match('/cache/', $thumb)) {
                $xml_item .= createTag('thumbnail', trim($thumb));
            }
        }
        // genres
        if (count($row['genres'])) {
            $xml_genres = '';
            foreach ($row['genres'] as $genre) {
                $xml_genres .= createTag('genre', $genre['name']);
            }
            $xml_item .= createContainer('genres', $xml_genres);
        }
        // actors
        $actors = explode("\n", $item['actors']);
        if (count($actors)) {
            $xml_actors = '';
            foreach ($actors as $actor) {
                $xml_actor_data = '';
                $actor_data = explode("::", $actor);
                $xml_actor_data .= createTag('name', $actor_data[0]);
                $xml_actor_data .= createTag('role', $actor_data[1]);
                $xml_actor_data .= createTag('imdbid', $actor_data[2]);
                $xml_actors .= createContainer('actor', $xml_actor_data);
            }
            $xml_item .= createContainer('actors', $xml_actors);
        }
        $xml .= createContainer('item', $xml_item);
    }
    $xml = '<?xml version="1.0" encoding="utf-8"?>' . "\n" . createContainer('catalog', $xml);
    //    header('Content-type: text/xml');
    $mime = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ? 'application/force-download' : 'application/octet-stream';
    header('Content-type: ' . $mime);
    header('Content-length: ' . strlen($xml));
    header('Content-disposition: attachment; filename=videoDB.xml');
    echo $xml;
}
Ejemplo n.º 14
0
<?
$extension = pathinfo($args['fvalue'], PATHINFO_EXTENSION);
$type = getfiletype($extension);

$_SESSION['murrix']['rightcache']['file'][] = $args['value_id'];

?><a href="?file=<?php 
echo $args['value_id'];
?>
"><?

if ($type == "image")
{
	$maxsize = getSetting("THUMBSIZE", 150);
	$thumbnail = getThumbnail($args['value_id'], $maxsize, $maxsize);
	
	if ($thumbnail !== false)
		echo $thumbnail->Show(true)."<br/>";
	else
		echo img(geticon(getfiletype($extension), 16))." ";
}
else
	echo img(geticon(getfiletype($extension), 16))." ";
	
echo $args['value'];
?>
</a>
Ejemplo n.º 15
0
    <div class="col-sm-9 wrap-content">
      <?php 
if ($newestVideo) {
    ?>
        <div class="section-line">
          <div class="row">
            <div class="col-sm-12">
              <div class="item-video item-feature">
                <div class="row">
                  <div class="ui-thumb big-ui-thumb col-sm-5">
                    <a href="<?php 
    echo makeLink($newestVideo[0]['id'], $newestVideo[0]['title']);
    ?>
">
                      <img src="<?php 
    echo getThumbnail($newestVideo[0]['series']['thumbnail'], 'series');
    ?>
" alt="<?php 
    echo $newestVideo[0]['title'];
    ?>
 " class="img-responsive" />
                      <span class="fa fa-play-circle-o"></span>
                    </a>
                  </div><!-- /.ui-thumb -->
                  <div class="ui-meta col-sm-7">
                    <h3 class="ui-title"><a href="<?php 
    echo makeLink($newestVideo[0]['id'], $newestVideo[0]['title']);
    ?>
" class="ui-ellipsis-2"><?php 
    echo $newestVideo[0]['title'];
    ?>
$id = $_GET['id'];
$pagerow = getRow('users', "user_id = {$id}");
if ($pagerow['user_active'] == 0) {
    err('Šis profilis panaikintas');
    return;
}
if ($pagerow['user_acctype'] <= 0) {
    err('Šis profilis neegzistuoja');
    return;
}
// User description
echo '<div class="page">';
echo '<div class="page-con">';
echo '<div class="ku_img">';
if (strlen($pagerow['user_thumb']) > 3) {
    getThumbnail('users', $pagerow['user_id']);
} else {
    echo '<img src="/img/nt_ku.png" alt="nothumb" />';
}
echo '</div><div class="ku_desc">';
echo '<h2>' . $pagerow['user_fname'] . ' ' . $pagerow['user_lname'] . '</h2>';
echo '<b>Kuratorius</b>';
echo '<br>';
foreach ($regionsListChildren as $key => $cities) {
    if (in_array($pagerow['user_city'], $cities)) {
        echo '<a href="/regionuose?p=puslapis&pageslug=regionuose&reg=' . $key . '&city=all&ptype=2">' . $regionsList[$key] . '</a> &gt; ';
        $rgn = $key;
    }
}
if (isset($rgn)) {
    echo '<a href="/regionuose?p=puslapis&pageslug=regionuose&reg=' . $rgn . '&city=' . $pagerow['user_city'] . '&ptype=2">' . $citiesList[$pagerow['user_city']] . '</a>';
Ejemplo n.º 17
0
<fieldset>
  <legend><strong>Series detail</strong></legend>
  <table class="stats" style="width: 100%;border: 1px #000">

    <tbody>
      <tr>
        <td>Title</td>
        <td><?php 
echo empty($title) ? '' : $title;
?>
</td>
      </tr>
      <tr>
        <td>Thumbnail</td>
        <td><img height="100" src="<?php 
echo getThumbnail($thumbnail, 'series');
?>
"></td>
      </tr>
      <tr>
        <td>Description</td>
        <td><?php 
echo empty($description) ? '' : $description;
?>
</td>
      </tr>
      <tr>
        <td>Video Type</td>
        <td><?php 
echo $video_type[$type];
?>
Ejemplo n.º 18
0
<?
$filename = $object->getVarValue("file");
$value_id = $object->resolveVarName("file");

$type = getfiletype(pathinfo($filename, PATHINFO_EXTENSION));

$data = "";

if ($type == "image")
{
	$maxsize = getSetting("THUMBSIZE", 150);
	$angle = $object->getMeta("angle", "");
	
	$thumbnail = getThumbnail($value_id, $maxsize, $maxsize, $angle);
	
	$_SESSION['murrix']['rightcache']['thumbnail'][] = $thumbnail->id;
	
	if ($thumbnail !== false)
		$data = $thumbnail->Show(true);
}

if (!empty($data))
	$img = $data;
else
	$img = img(geticon($type, 128));

$name = $object->getName();

if ($args['disabled'] != true)
{
	$name = cmd($name, "exec=show&node_id=".$object->getNodeId());
Ejemplo n.º 19
0
"/></td>
        </tr>
        <tr>
          <td>Order</td>
          <td><input type="text" name="order"  value="<?php 
echo empty($order) ? '' : $order;
?>
"/></td>
        </tr>
        <tr>
          <td>
            <?php 
if ($item_thumbnail) {
    ?>
              <img height ="100" src="<?php 
    echo getThumbnail($item_thumbnail, 'editor');
    ?>
">
            <?php 
} else {
    ?>
              Image<span style="color: red">*</span>
            <?php 
}
?>
          </td>
          <td><input type="file" name="item_thumbnail" id="item_thumbnail"/></td>
        </tr>
      </tbody>
    </table>
  </fieldset>
Ejemplo n.º 20
-1
/**
 * Export PDF document
 *
 * @param   string  $where  WHERE clause for SQL statement
 */
function pdfexport($WHERE)
{
    global $config;
    $ypos = $config['pdf_font_size'];
    // Match the font size for proper vertical offset
    $page_width = $config['pdf_page_width'];
    $margin = $config['pdf_margin'];
    $left_margin = $config['pdf_left_margin'];
    $right_margin = $config['pdf_right_margin'];
    $mediaimg_width = $config['pdf_image_media_width'];
    $font_size = $config['pdf_font_size'];
    $image_height = $config['pdf_image_height'];
    $image_width = $config['pdf_image_width'];
    $font_title = $config['pdf_font_title'];
    $font_plot = $config['pdf_font_plot'];
    $text_length = $config['pdf_text_length'];
    $tempfolder = cache_get_folder('');
    if ($config['cache_pruning']) {
        cache_prune_folder($tempfolder, 3600, false, false, 'videodb*.pdf');
    }
    $filename = $tempfolder . 'videodb' . date('His', time()) . '.pdf';
    // setup pdf class
    $pdf = new PDF();
    $pdf->Open($filename);
    $pdf->VerifyFont($font_title);
    $pdf->VerifyFont($font_title, 'B');
    $pdf->VerifyFont($font_plot);
    $pdf->AddPage();
    $pdf->SetRightMargin($right_margin);
    // add downscaling
    if ($config['pdf_scale']) {
        $pdf->Scale = $config['pdf_scale'];
        $pdf->max_width = $config['pdf_image_max_width'];
        $pdf->max_height = $config['pdf_image_max_height'];
    }
    // get data
    $result = iconv_array('utf-8', 'iso-8859-1', exportData($WHERE));
    foreach ($result as $row) {
        set_time_limit(300);
        // rise per movie execution timeout limit if safe_mode is not set in php.ini
        $title = $row['title'];
        if ($row['subtitle']) {
            $title .= ' - ' . $row['subtitle'];
        }
        if ($row['diskid'] || $row['mediatype']) {
            $title .= ' [';
            if ($row['mediatype']) {
                $title .= $row['mediatype'] . ', ';
            }
            if ($row['diskid']) {
                $title .= $row['diskid'];
            }
            $title = preg_replace('/, $/', '', $title) . ']';
        }
        // get drilldown url for image
        $imdb = $row['imdbID'];
        $link = $imdb ? engineGetContentUrl($imdb, engineGetEngine($imdb)) : '';
        // title
        $pdf->SetFont($font_title, 'B', $font_size);
        $pdf->SetXY($left_margin + $image_width + $margin, $ypos);
        $pdf->Cell(0, 0, $title, 0, 1, 'L', 0, $link);
        // [muddle] technical details
        unset($tech['V']);
        if ($row['video_width'] and $row['video_height']) {
            $vw = $row['video_width'];
            $vh = $row['video_height'];
            $tech['V'] = "Video: ";
            if ($vw > 1920) {
                $tech['V'] .= "UHD " . $vw . "x" . $vh;
            } elseif ($vw > 1280) {
                $tech['V'] .= "HD 1080p";
            } elseif ($vw == 1280 or $vh == 720) {
                $tech['V'] .= "HD 720p";
            } elseif ($vw == 720 or $vw == 704) {
                $tech['V'] .= "SD ";
                if ($vh == 480) {
                    $tech['V'] .= "NTSC";
                } elseif ($vh == 576) {
                    $tech['V'] .= "PAL";
                } else {
                    $tech['V'] .= $vw . "x" . $vh;
                }
            } else {
                $tech['V'] .= "LORES " . $vw . "x" . $vh;
            }
        }
        unset($tech['A']);
        if ($row['audio_codec']) {
            $tech['A'] = "Audio: " . $row['audio_codec'];
        }
        unset($tech['D']);
        if ($row['created']) {
            $tech['D'] = "Date: " . $row['created'];
        }
        $techinfo = implode(", ", $tech);
        $pdf->SetFont($font_title, 'B', $font_size - 3);
        $pdf->SetXY($left_margin + $image_width + $margin, $ypos + 4);
        $pdf->Cell(0, 0, $techinfo, 0, 1, 'L', 0);
        // plot
        $plot = leftString($row['plot'], $text_length);
        $pdf->SetFont($font_plot, '', $font_size - 1);
        $pdf->SetXY($left_margin + $image_width + $margin, $ypos + 3 + 3);
        $pdf->SetLeftMargin($left_margin + $image_width + $margin);
        $pdf->WriteHTML($plot);
        // image
        $file = getThumbnail($row['imgurl']);
        if (preg_match('/^img.php/', $file)) {
            $file = img();
        }
        // image file present?
        if ($file) {
            $pdf->Image($file, $left_margin, $ypos - 2, $image_width, $image_height, '', $link);
        }
        // add mediatype image
        if ($type_image = getMediaImage($row['mediatype'])) {
            $pdf->Image('./images/media/' . $type_image, $page_width - $mediaimg_width - $right_margin, $ypos - 2, $mediaimg_width, 0, '', '');
        }
        // new position
        $ypos += $margin;
        if ($file or $plot) {
            $ypos += max($image_height, $font_size);
        } else {
            $ypos += $font_size;
        }
        if ($ypos > 250) {
            $ypos = $config['pdf_font_size'];
            $pdf->AddPage();
        }
    }
    $pdf->Output('videoDB.pdf', 'D');
    // get rid of temp file
    @unlink($filename);
}