<?php 
  require('load_this/load_this_bigware_10.php');
  require(FOLDER_RELATIV_LANGUAGES . $language . '/main_bigware_25.php'); 


        $zuruecklink = '';
        $vorlink = '';
        $vorlink_1 = '';
        $vorlink_2 = '';
        
  $galerie_count_query = go_db_query("select count(*) as total from " . DB_TBL_GALERIE_TO_PICTURES . " where  galeries_id = '" . $galeries_id . "' AND vorschau != '1'");
     $galerie_count = go_db_fetch_array($galerie_count_query);      

        
        $count = 0;
        $picture_query = go_db_query("SELECT * FROM " . DB_TBL_GALERIE_TO_PICTURES . " where galeries_id = '" . $galeries_id . "' AND vorschau != '1' ORDER BY sort_order ASC");
	while($picture_werte = go_db_fetch_array($picture_query)){
			$count++;
		if ($galerie_to_picture_id == $vorherige_galerie_to_picture_id){
			$vorlink_1 = '<a href="' . $GLOBALS[CONFIG_NAME_FILE][main_bigware_25] . '?galeries_id=' . $galeries_id . '&galerie_to_picture_id=' . $picture_werte['galerie_to_picture_id'] . '">';
			$vorlink_2 = '</a>';
			$vorlink = $vorlink_1 . '<img border="0" src="' . FOLDER_RELATIV_PIC_POPUP_TEMPLATES . 'vor.gif' . '">' . $vorlink_2;
			}

		if ($picture_werte['galerie_to_picture_id'] == $galerie_to_picture_id) {
			$diese_nummer = $count;
			if ($vorherige_galerie_to_picture_id != ""){
				$zuruecklink = '<a href="' . $GLOBALS[CONFIG_NAME_FILE][main_bigware_25] . '?galeries_id=' . $galeries_id . '&galerie_to_picture_id=' . $vorherige_galerie_to_picture_id . '"><img border="0" src="' . FOLDER_RELATIV_PIC_POPUP_TEMPLATES . 'zurueck.gif"></a>';
			}
			$bild_show = '<IMG src="' . FOLDER_RELATIV_PICTURES . $picture_werte["pictures"] . '" border=0>';

                  	$picture_ersten_query = go_db_query("SELECT * FROM " . DB_TBL_GALERIE_TO_PICTURES . " where galeries_id = '" . $galeries_id . "' AND vorschau != '1' ORDER BY sort_order ASC  LIMIT 0 , 1");
                  	$picture_ersten_werte = go_db_fetch_array($picture_ersten_query);
                  	if ($vorherige_galerie_to_picture_id != ""){
                  		$ganzzuruecklink = '<a href="' . $GLOBALS[CONFIG_NAME_FILE][main_bigware_25] . '?galeries_id=' . $galeries_id . '&galerie_to_picture_id=' . $picture_ersten_werte['galerie_to_picture_id'] . '"><img border="0" src="' . FOLDER_RELATIV_PIC_POPUP_TEMPLATES . 'ganzzurueck.gif"></a>';
			}
                  	$picture_letzten_query = go_db_query("SELECT * FROM " . DB_TBL_GALERIE_TO_PICTURES . " where galeries_id = '" . $galeries_id . "' AND vorschau != '1' ORDER BY sort_order DESC  LIMIT 0 , 1");
			$picture_letzten_werte = go_db_fetch_array($picture_letzten_query);
			
  			if ($galerie_count['total'] != $count){	
  				$ganzvorlink = '<a href="' . $GLOBALS[CONFIG_NAME_FILE][main_bigware_25] . '?galeries_id=' . $galeries_id . '&galerie_to_picture_id=' . $picture_letzten_werte['galerie_to_picture_id'] . '"><img border="0" src="' . FOLDER_RELATIV_PIC_POPUP_TEMPLATES . 'ganzvor.gif"></a>';
        		}
        	}
        		$vorherige_galerie_to_picture_id = $picture_werte["galerie_to_picture_id"];
      	}
			$bild_show = $vorlink_1 . $bild_show . $vorlink_2;
      	
	       $conf_query = go_db_query("SELECT * FROM " . DB_TBL_GALERIE_CONF . " where galerie_conf_id = '1'");
	       $conf_werte = go_db_fetch_array($conf_query);     
	       $name_query = go_db_query("SELECT galeries_name FROM " . DB_TBL_GALERIE_DESCRIPTION . " where galeries_id = '" . $galeries_id . "'  LIMIT 0 , 1");
	       $name_werte = go_db_fetch_array($name_query);   	
  
		$rahmenfarbe1 = $conf_werte["rahmenfarbe1"];  
		$rahmenbreite1 = $conf_werte["rahmenbreite1"]; 
		$ueberschriftfarbe = $conf_werte["ueberschriftfarbe"]; 
		$ueberschriftfont = $conf_werte["ueberschriftfont"]; 
		$ueberschriftgroesse = $conf_werte["ueberschriftgroesse"]; 
		$tbrahmenfarbe = $conf_werte["tbrahmenfarbe"]; 
		$tbhintergrundfarbe = $conf_werte["tbhintergrundfarbe"]; 
      
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0062)http://www.galerie.oldtoycars.de/typische_galerie/gal_008.html -->
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
</HEAD>
<BODY>
<CENTER>
</TD></TR><TR 
height="20"><TD colSpan="2"></TD></TR></TABLE></CENTER><br>
<table border="1" cellspacing="0" style="border-collapse: collapse" bordercolor="<?php echo $tbrahmenfarbe; ?>" width="100%" id="AutoNumber1" bgcolor="<?php echo $tbrahmenfarbe; ?>">
  <tr>
    <td width="100%">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; padding-left: 10; padding-right: 10" width="100%" id="AutoNumber3">
      <tr>
        <td width="50%" style="color: <?php echo $ueberschriftfarbe; ?>; font-size: <?php echo $ueberschriftgroesse; ?>px; font-family: <?php echo $ueberschriftfont; ?>"><?php echo $name_werte['galeries_name']; ?></td>
        <td width="50%" style="color: <?php echo $ueberschriftfarbe; ?>; font-size: <?php echo $ueberschriftgroesse; ?>px; font-family: <?php echo $ueberschriftfont; ?>">
        <p align="right"><?php echo SEITE_WINDOW; ?> <?php echo $diese_nummer; ?> von <?php echo $count; ?></td>
      </tr>
    </table>
    </td>
  </tr>
</table>
<table border="1" cellspacing="0" style="border-collapse: collapse" bordercolor="<?php echo $tbrahmenfarbe; ?>" width="100%" id="AutoNumber2" height="90%">
  <tr>
    <td width="100%" bgcolor="<?php echo $tbhintergrundfarbe; ?>">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber4" height="100%">
      <tr>
        <td width="100%" valign="top">
              <TABLE cellSpacing=6 width="100%" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0">
              <TR>
                <TD align=right><FONT color=#000000 size=2><U><a href="" onClick="JavaScript:self.close()"><?php echo CLOSE_WINDOW; ?></a></U></FONT> 
                </TD>
               </TR>
              </TABLE>           </td>
      </tr>
      <tr>
        <td width="100%">
        &nbsp;<div align="center">
              <center>
            <TABLE>
              <TBODY>
              <TR>
                <TD align=middle>
		<div align="center">
		  <center>                
                  <?php echo $ganzzuruecklink; ?>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $zuruecklink; ?>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $vorlink; ?> 
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $ganzvorlink; ?> <br>
&nbsp;</center>
		</div>                 
				</TD></TR>
              <TR>
                <TD align=middle>
		<div align="center">
		  <center>
                  <table border="<?php echo $rahmenbreite1; ?>" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="<?php echo $rahmenfarbe1; ?>" id="AutoNumber5">
                    <tr>
                      <td width="100%"><?php echo $bild_show; ?></td>
                    </tr>
                  </table>
		</center>
		</div>
                  </TD></TR>
              <TR>
                <TD align=middle>
		<div align="center">
		  <center>                
                  <br>
                  <?php echo $ganzzuruecklink; ?>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $zuruecklink; ?>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $vorlink; ?> 
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $ganzvorlink; ?>
		</center>
		</div>                  
                  </TD></TR></TBODY></TABLE></center>
          </div>  </td>
      </tr>
      <tr>
        <td width="100%" valign="bottom">
        
              <TABLE cellSpacing=6 width="100%" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0">
              <TR>
                <TD align=right><FONT color=#000000 size=2><U><a href="" onClick="JavaScript:self.close()"><?php echo CLOSE_WINDOW; ?></a></U></FONT> 
                </TD>
               </TR>
              </TABLE>   
                
     </td>
      </tr>
    </table>
  
 
    </td>
  </tr>
</table>

</BODY></HTML>