<?php
require_once DIR_CORE.'files-'.DB_TYPE.'.php';
require_once DIR_CORE.'files.php';

require_once DIR_CORE.'products-'.DB_TYPE.'.php';
require_once DIR_CORE.'products.php';

if( $a == 'Show' ){
  if( isset( $iIdLink ) && is_numeric( $iIdLink ) && isset( $iType ) && is_numeric( $iType ) ){
    if( $iType == 1 )
      $aData  = throwProduct( $iIdLink );
    else
      $aData  = throwCategory( $iIdLink, true, true );
  }
  if( isset( $aData ) && is_array( $aData ) ){
    if( !isset( $iPhoto ) || !is_numeric( $iPhoto ) )
      $iPhoto = 1;
    $sGallery = showPhotosGalleryPopup( $iIdLink, 'gallery.tpl', $iPhoto, $iType );
  }
  $content .= !empty( $sGallery ) ? $sGallery : $tpl->tbHtml( 'messages.tpl', 'ERROR' );
}
?>