Plac Piastowski
89-604 Chojnice
tel./fax 052 397 94 20
052 397 75 06
Zapraszamy Państwa serdecznie do naszej
restauracji oraz do pubu.
Gwarantujemy spokój i niezapomniane chwile
w bardzo miłej atmosferze.
Fotogaleria


WI-FI darmowy internet bezprzewodowy
Płatności obsługuje PolCard
$v) { ${$k} = $v; } mysql_connect("localhost","foto","FoTo555"); mysql_select_db("fotogaleria"); mysql_query("SET NAMES latin2"); #print mysql_error(); if (!class_exists("smarty")) require_once('Smarty.class.php'); $smarty = new Smarty; $smarty -> caching=false; #if ($id_gal==20) $smarty -> debugging = true; if (isset($_GET['debug_gal'])) $smarty -> debugging = true; list($dir,$tab,$url,$uri,$one_tr,$tlumacz) = @mysql_fetch_row(@mysql_query("select katalog,tabela,url,uri_to_".$typ.",one_tr, tlumacz from foto_tabele where id='$id_gal'")); print mysql_error(); if ($tlumacz == true) { $lg = ($_GET['l'] == "en" ? "en" : false); if( isset( $_GET['lg'] ) ) { $lg = ( in_array( $_GET['lg'], array( "de","en" ) ) ? $_GET['lg'] : "pl" ); } } else $lg = false; list($uri_kartki) = @mysql_fetch_row(@mysql_query("select uri_to_kartki from foto_tabele where id='$id_gal'")); $smarty_dir = $dir; $smarty -> assign('uri_kartki',$uri_kartki); $smarty -> assign('dir',$dir); $smarty -> assign('url',$url); $smarty -> assign('uri',$uri); $smarty -> assign('one_tr',$one_tr); $smarty -> assign('id_kat',$id_kat); $smarty -> assign('id_fot',$id_fot); $tb["kat"] = "foto_".$tab."_kat"; $tb["zdj"] = "foto_".$tab."_zdjecia"; $tb["aut"] = "foto_".$tab."_autor"; $tb["wys"] = "foto_".$tab."_wyslane"; ?> $v){ ${$k} = $v; } if (!$id_kat && !$id_fot) { $name_k = "Wybierz kategorię"; //najczesciej ogladane $r = @mysql_query("select $tb[zdj].id,$tb[zdj].id_kat,$tb[zdj]._file from $tb[zdj],$tb[kat] where $tb[zdj].status='1' and $tb[zdj].id_kat=$tb[kat].id_kat and $tb[kat].".$typ."='1' order by wyswietlen DESC LIMIT 3"); $tmp = array(); $i=0; while (list($id,$id_kat,$plik) = @mysql_fetch_row($r)) { $tmp[] = array("id"=>$id,"plik"=>$plik,"id_kat" => $id_kat,"i"=>$i); $i++; } $smarty -> assign('the_best_fot',$tmp); //ostatnio dodane $r = @mysql_query("select $tb[zdj].id,$tb[zdj].id_kat,$tb[zdj]._file from $tb[zdj],$tb[kat] where $tb[zdj].status='1' and $tb[zdj].id_kat=$tb[kat].id_kat and $tb[kat].".$typ."='1' order by $tb[zdj].data DESC LIMIT 3"); $tmp = array(); $i=0; while (list($id,$id_kat,$plik) = @mysql_fetch_row($r)) { $tmp[] = array("id"=>$id,"plik"=>$plik,"id_kat" => $id_kat,"i"=>$i); $i++; } $smarty -> assign('last_fot',$tmp); //losowe $r = @mysql_query("select $tb[zdj].id,$tb[zdj].id_kat,$tb[zdj]._file from $tb[zdj],$tb[kat] where $tb[zdj].status='1' and $tb[zdj].id_kat=$tb[kat].id_kat and $tb[kat].".$typ."='1' group by $tb[zdj].id_kat order by rand() LIMIT 3"); $tmp = array(); $i=0; while (list($id,$id_kat,$plik) = @mysql_fetch_row($r)) { $tmp[] = array("id"=>$id,"plik"=>$plik,"id_kat" => $id_kat,"i"=>$i); $i++; } $smarty -> assign('rand_fot',$tmp); } if ($id_kat && !$id_fot) { list($top_k,$name_k,$opis_k) = @mysql_fetch_row(@mysql_query("select kategoria".(( ($lg == "en" or $lg == "de" ) and $tlumacz) ? "_$lg as kategoria" : false).",nazwa".((( $lg == "en" or $lg == "de" ) and $tlumacz) ? "_$lg as nazwa" : false).",opis from $tb[kat] where id_kat='".$id_kat."'")); $z = "select $tb[zdj].id, $tb[zdj]._file, $tb[zdj].tytul".(( ($lg == "en" or $lg == "de" ) and $tlumacz) ? "_$lg as tytul" : false).", $tb[zdj].id_kat from $tb[zdj] left JOIN $tb[kat] ON $tb[kat].id_kat=$tb[zdj].id_kat ".($tab == "poznajswiat" ? " and (($tb[zdj].id_art>0 and $tb[kat].nazwa like 'Numer%') or ($tb[kat].nazwa NOT LIKE 'Numer%')) " : "") ." where $tb[zdj].status='1' and $tb[zdj].id_kat='$id_kat' order by $tb[zdj].pozycja DESC"; // ".($tb['kat'] == "foto_videooko_kat" ? ",tytulfilmu,gatunek,rezyser,obsada,nosnik" : false )." $r = @mysql_query($z); $tmp = array(); $i=0; $smarty -> assign('top_kat',$top_k); $smarty -> assign('kat_name',$name_k); $smarty -> assign('kat_opis',$opis_k); while (list($id,$plik,$podpis,$id_kat,$film['tytul'],$film['gatunek'],$film['rezyser'],$film['obsada'],$film['nosnik']) = @mysql_fetch_row($r)) { $tmp[] = array("id"=>$id,"plik"=>$plik,"podpis"=> strip_tags( $podpis ),"i"=>$i,"id_kat" => $id_kat,"film" => $film); $i++; } print @mysql_error(); $smarty -> assign('all_fot',$tmp); } if ($id_fot) { @mysql_query("update foto_".$tab."_zdjecia set wyswietlen = wyswietlen +1 where id='$id_fot'"); $foto = @mysql_fetch_array(@mysql_query($q = " select ".( $tab=="poznajswiat" ? "$tb[zdj].id_art," : "" )." $tb[aut].name, $tb[aut].mail, $tb[zdj].kartka, $tb[zdj].pozycja, $tb[kat].kategoria".((($lg == "en" or $lg == "de" ) and $tlumacz) ? "_$lg as kategoria" : false ).", $tb[kat].nazwa".((($lg == "en" or $lg == "de" ) and $tlumacz) ? "_$lg as nazwa" : false ).", $tb[zdj]._file, $tb[zdj].tytul".((($lg == "en" or $lg == "de" ) and $tlumacz) ? "_$lg as tytul" : false ).", $tb[zdj].id_kat, $tb[zdj].kartka from $tb[zdj] LEFT JOIN $tb[aut] ON $tb[aut].id = $tb[zdj].id_autor LEFT JOIN $tb[kat] ON $tb[zdj].id_kat=$tb[kat].id_kat and $tb[kat].status='1' and $tb[kat].".$typ."='1' where $tb[zdj].id='$_GET[id_fot]' and $tb[zdj].status='1'")); #if( $_SERVER['REMOTE_ADDR'] == "83.18.81.118" ) print $q; $top_k = $foto[kategoria]; $name_k = $foto[nazwa]; # $opis_k = $foto[opis]; $smarty -> assign('top_kat',$top_k); $smarty -> assign('name_kat',$name_k); # $smarty -> assign('opis_kat',$opis_k); if($tab == "poznajswiat") { @mysql_select_db("poznajswiat"); $art = @mysql_fetch_array(@mysql_query("select ps_tytuly.tytul1, ps_tytuly.id, ps_numer.numer, ps_numer.id as id_numer, ps_numer.data from ps_tytuly LEFT JOIN ps_numer ON ps_numer.id=ps_tytuly.id_nr and ps_numer.status='1' where ps_tytuly.status='1' and ps_tytuly.id='$foto[id_art]'")); $smarty -> assign('art',$art); @mysql_select_db("fotogaleria"); list($tapeta) = @mysql_fetch_row(@mysql_query("select id from foto_".$tab."_tapkat where id_fot='$id_fot'")); } list($next_) = @mysql_fetch_row(@mysql_query("select id from foto_".$tab."_zdjecia where id_kat='$foto[id_kat]' and pozycja<'$foto[pozycja]' and status='1' order by pozycja DESC LIMIT 1")); list($pref_) = @mysql_fetch_row(@mysql_query("select id from foto_".$tab."_zdjecia where id_kat='$foto[id_kat]' and pozycja>'$foto[pozycja]' and status='1' order by pozycja ASC LIMIT 1")); $smarty -> assign('fota', array( 'kartka'=>$foto['kartka'], 'katname'=>$foto['nazwa'], 'id_kat' => $foto['id_kat'], 'plik'=>$foto['_file'], "podpis"=>(stripslashes($foto['tytul'])), "aut_name"=>htmlspecialchars(stripslashes($foto['name'])), "aut_mail"=>$foto['mail'], "next"=>$next_, "pref"=>$pref_, "tapeta" => $tapeta ) ); $smarty -> assign('id_kat',$foto['id_kat']); } $smarty -> assign('top_k',$top_k); $smarty -> assign('name_k',$name_k); if ($fot_top_szablon) { $smarty -> display($fot_top_szablon); } else { $smarty -> display('fot_top.tpl'); } ?> assign('kat_fot',1); if( isset( $_GET['top'] ) ) { $top = mysql_fetch_assoc( mysql_query( "SELECT kategoria FROM $tb[kat] WHERE nazwa = '".addslashes( $_GET['top'] )."'" ) ); } $r = mysql_query( $q = "select $tb[kat].kategoria".((($lg == "en" or $lg=="de" ) and $tlumacz) ? "_$lg as kategoria " : false)." , max( $tb[kat].data ) as maxdata from $tb[kat] where $tb[kat].".$typ."='1' and $tb[kat].status='1' ".( isset( $top['kategoria'] ) ? " AND kategoria = '".$top['kategoria']."' ": false )." group by $tb[kat].kategoria order by maxdata DESC, $tb[kat].id_kat DESC"); //if( $_SERVER['REMOTE_ADDR'] == "83.18.81.118" ) print $q; $top_kat = array(); while($t = mysql_fetch_array($r)) { $top_kat[] = $t['kategoria']; } $smarty -> assign('top_kat',$top_kat); #if ($_SERVER['REMOTE_ADDR'] == "83.18.81.118" ) # print $query; $RAND = array(); if( $tab != "chinfo" ) { $query = "select kat.id_kat, zdj._file from ".$tb['kat']." as kat LEFT JOIN ".$tb['zdj'] ." as zdj ON zdj.status='1' and kat.id_kat = zdj.id_kat WHERE 1 ".($tab == "poznajswiat" ? " and zdj.id_art > 0 " : "" )." group by zdj.id_kat order by zdj.losowa DESC, rand()"; $r_tmp = mysql_query( $query ); while( $tmp = mysql_fetch_assoc( $r_tmp ) ) { $RAND[$tmp['id_kat']] = $tmp['_file']; } } $r = mysql_query( $q = "SELECT $tb[kat].id_kat, $tb[kat].kategoria".((($lg == "en" or $lg=="de" ) and $tlumacz) ? "_$lg as kategoria " : false).", $tb[kat].nazwa".( ($lg == "en" || $lg == "de" ) ? "_$lg as nazwa " : false).", count($tb[zdj].id) as ilosc FROM $tb[zdj] LEFT JOIN $tb[kat] ON $tb[zdj].id_kat = $tb[kat].id_kat and $tb[zdj].status='1' where $tb[kat].status='1' and $tb[kat].".$typ."='1' GROUP BY $tb[zdj].id_kat order by $tb[kat].kategoria, $tb[kat].pozycja DESC"); #if( $_SERVER['REMOTE_ADDR'] == "83.18.81.118" ) print $q; $all_kat = array(); $i=0; while ($t = mysql_fetch_array($r)) { if( $t['ilosc'] ) { # $tmp_r = "select if(count(*) >0,'1','0') from ".$tb['zdj']." where (DATE_ADD(data,INTERVAL 7 DAY)>now()) and id_kat='".$t[id_kat]."' and status='1'"; # if( $_SERVER["REMOTE_ADDR"] == "80.48.25.8" ) # print $tmp_r; # list($new) = @mysql_fetch_row(mysql_query( $tmp_r )); $new = 0; # if($_SERVER["REMOTE_ADDR"] == "80.48.25.8" ) # print $r_tmp."

"; $foto = $RAND[$t['id_kat']]; // list($foto) = @mysql_fetch_row(mysql_query($r_tmp)); if ($old_ != $t['kategoria']) $i=0; $old_ = $t['kategoria']; if ($id_fot_default) { # list($id_fot_link) = @mysql_fetch_row(mysql_query("select id FROM foto_".$tab."_zdjecia where id_kat='".$t['id_kat']."' order by RAND() LIMIT 1")); } $all_kat[] = array( "id" =>$t['id_kat'], "kategoria" => $t['kategoria'], "nazwa" => $t['nazwa'], "ilosc"=> $t['ilosc'], "foto" => $foto, "new"=>$new, "i" => $i, "id_fot_default" => $id_fot_link ); $i++; } } //przekazuje wszyskie kategorie $smarty -> assign('all_kat',$all_kat); if ($fot_katlista_szablon) { $smarty -> display($fot_katlista_szablon); } else { $smarty -> display("fot_katlista.tpl"); } ?>

 
   
 

 
   
 

 
   
 
Hosting, systemy internetowe