'; //$google_start = "aid"; $res = ask_sql("SELECT * FROM `".$master_name."_structure` WHERE (file_name != '' or id = '$glowna_id') ".(isColumn($master_name."_structure", "ukryty_check") ? " and ( ukryty_check IN(0,3) or id = '$glowna_id' ) " : "")." ".($google_start && isColumn($master_name."_structure", $google_start) ? " and (`$google_start` > 0 or id = '$glowna_id') " : "")." ORDER by (id = '$glowna_id') DESC, `domena` DESC, `aid` ASC, `bid` ASC, `cid` ASC, `index` ASC"); while($t = mysql_fetch_assoc($res)){ if( $t["id"] == $glowna_id ){ $link = $domain; } else { $link = getWiecejLink(($t["odsylacz_link"] ? $t["odsylacz_link"] : $t["id"])); } $images = ""; $ress = ask_sql("SELECT * FROM ".$master_name." WHERE ukryty_check = 0 and skracac_check != 1 and pid = '".$t["id"]."'"); while ($rt = mysql_fetch_assoc($ress)){ for ($i = 0; $i<=9;$i++){ $alt = ($rt[$ii."_alt"] ? $rt[$ii."_alt"] : $rt[$ii."_podpis"]); $ii = ($i==0 ? "glowne_foto" : $i."_foto"); $alt = htmlspecialchars($alt); if( $rt[$ii] && file_exists("files/".$rt[$ii]) ){ if( file_exists("data/tlo.png") ){ $foto = getFotoName("files", $rt[$ii], -1, 1200, "", "", $domain); } else { $foto = $domain."/files/".$rt[$ii]; } $images .= ' '.$foto.' '.($alt ? ''.$alt.'' : "").' '; } } } $ta = cache_structure($t['aid']); $tb = cache_structure($t['bid']); $tc = cache_structure($t['cid']); if( $ta["ukryty_check"] == 1 || $tb["ukryty_check"] == 1 || $tc["ukryty_check"] == 1 ) { } else { if( !$cache[$link] && ereg("htt", $link)){ if( !$cache ){ $pio =1; $change = "weekly"; } else { $change = "weekly"; $pio = 0.5; } $cache[$link]=1; if( $link == "/" ) $link = $domain; if( ereg("http", $link ) ) echo " $link".$images. ($t["data"] != '0000-00-00 00:00:00' && $t["data"] ? " ".date("Y-m-d", strtotime($t["data"]))."" : "") .($change ? " $change" : "") .($pio ? " $pio" : "")." "; }} } $rres = ask_sql("SELECT * FROM `".$master_name."` WHERE `skracac_check` = 1 ".(isColumn($master_name, "ukryty_check") ? " and ukryty_check IN(0,3) " : "")." ORDER by `index` ASC"); while($t = mysql_fetch_assoc($rres)){ $link = getWiecejLink(getLinkFromId($t["pid"]). "?more=" . $t["id"]); $images = ""; for ($i = 0; $i<=9;$i++){ $alt = ($t[$ii."_alt"] ? $t[$ii."_alt"] : $t[$ii."_podpis"]); if( !$alt && $i == 0){ $alt = $t["nazwa"]; } $alt = htmlspecialchars($alt); $ii = ($i==0 ? "glowne_foto" : $i."_foto"); if( $t[$ii] && file_exists("files/".$t[$ii]) ){ if( file_exists("data/tlo.png") ){ $foto = getFotoName("files", $t[$ii], -1, 1200, "", "", $domain); } else { $foto = $domain."/files/".$t[$ii]; } $images .= ' '.$foto.' '.($alt ? ''.$alt.'' : "").' '; } } if( !$cache[$link] && !$t["wiecej_link"] && ereg("htt", $link)){ $cache[$link]=1; $pio = 0; echo " $link".$images. ($t["data"] != '0000-00-00' && $t["data"] ? " ".date("Y-m-d", strtotime($t["data"]))."" : "") .($change ? " $change" : "") .($pio ? " $pio" : "")." "; } } if( isTable($master_name."_produkty")){ $rres = ask_sql("SELECT * FROM `".$master_name."_produkty` WHERE pid NOT IN(SELECT id FROM ".$master_name."_structure WHERE ukryty_check > 0) ".(isColumn($master_name."_produkty", "ukryty_check") ? " and ukryty_check IN(0,3) " : "")." ORDER by `index` DESC"); while($t = mysql_fetch_assoc($rres)){ $link = getProductLink($t["id"]); $images = ""; for ($i = 0; $i<=9;$i++){ $alt = ($t[$ii."_alt"] ? $t[$ii."_alt"] : $t[$ii."_podpis"]); if( !$alt && $i == 0) { $alt = $t["nazwa"]; } $alt = htmlspecialchars($alt); $ii = ($i==0 ? "glowne_foto" : $i."_foto"); if( $t[$ii] && file_exists("files/".$t[$ii]) ){ if( file_exists("data/tlo.png") ){ $foto = getFotoName("files", $t[$ii], -1, 1200, "", "", $domain); } else { $foto = $domain."/files/".$t[$ii]; } $images .= ' '.$foto.' '.($alt ? ''.$alt.'' : "").' '; } } if( !$cache[$link] && !$t["wiecej_link"] && ereg("htt", $link)){ $cache[$link]=1; $pio = 0; $change = ""; echo " $link".$images. ($t["data"] != '0000-00-00 00:00:00' && $t["data"] ? " ".date("Y-m-d", strtotime($t["data"]))."" : "") .($change ? " $change" : "") .($pio ? " $pio" : "")." "; } }} if( isTable($master_name."_news")){ $rres = ask_sql("SELECT * FROM `".$master_name."_news` WHERE pid NOT IN(SELECT id FROM ".$master_name."_structure WHERE ukryty_check > 0) ".(isColumn($master_name."_news", "ukryty_check") ? " and ukryty_check IN(0,3) " : "")." ORDER by `index` DESC"); while($t = mysql_fetch_assoc($rres)){ $link = getProductLink($t["id"], "p", $t["nazwa"], $t["pid"]); $images = ""; for ($i = 0; $i<=9;$i++){ $alt = ($t[$ii."_alt"] ? $t[$ii."_alt"] : $t[$ii."_podpis"]); if( !$alt && $i == 0) { $alt = $t["nazwa"]; } $alt = htmlspecialchars($alt); $ii = ($i==0 ? "glowne_foto" : $i."_foto"); if( $t[$ii] && file_exists("files/".$t[$ii]) ){ if( file_exists("data/tlo.png") ){ $foto = getFotoName("files", $t[$ii], -1, 1200, "", "", $domain); } else { $foto = $domain."/files/".$t[$ii]; } $images .= ' '.$foto.' '.($alt ? ''.$alt.'' : "").' '; } } if( !$cache[$link] && !$t["wiecej_link"] && ereg("htt", $link)){ $cache[$link]=1; $pio = 0; $change = ""; echo " $link".$images. ($t["data"] != '0000-00-00 00:00:00' && $t["data"] ? " ".date("Y-m-d", strtotime($t["data"]))."" : "") .($change ? " $change" : "") .($pio ? " $pio" : "")." "; } }} Sql_disconnect(); ?>