assign('idg', $_GET[id]); $smarty->assign('nazwa', $r[ngmina]); $smarty->assign('typ', $r[sttcode]); $smarty->assign('kontakt', $r[ludzie]); $idpow = $r[pow]; } sasiednie($r[pow],$_GET[id]); require("upload.class.php"); if($_FILES['plik']){ $upload = new upload($_FILES['plik'], "img/", $jak = MIME, $nazwa = 1, $typ = 1, $size = 1, $_GET[id]); $upload->dozwolone_s(array("image") ,MIME); $upload->wykonaj(); $upek = $upload->_echo(); } if(!empty($imgurl)){ $query = "INSERT INTO `gminy_foto` VALUES ('', '".$_GET[id]."', '".$imgurl."', '0')"; mysql_query($query); } $result=mysql_query("SELECT * FROM `gminy_foto` WHERE idg='".$_GET[id]."' AND akt='1'"); $xxx=mysql_num_rows($result); for ($i=0; $i < $xxx; $i++) { $r=mysql_fetch_array($result); $fotka = $r[nazwa]; $foteczki .= ""; } $smarty->assign('foteczki', $foteczki); $result = mysql_query("SELECT count(idf) FROM `gminy_foto` WHERE idg='".$_GET[id]."' AND akt='0'"); $r = mysql_fetch_array($result); $smarty->assign('oczekujace', $r[0]); $smarty->assign('upek', $upek); $smarty->assign('sasiednie', $sasiednie); $smarty->display('foto.html'); ?>