0){ @mysql_query("UPDATE vtipy_ext_click SET click = click + 1 WHERE den = $den AND mes = $mes AND rok = $rok"); } else{ @mysql_query("INSERT INTO vtipy_ext_click(click, den, mes, rok) VALUES( 1, $den, $mes, $rok)"); } Header("Location: http://astroseznamka.cz/index.php?co=legracky"); exit; } $vysledek_v = @MySQL_Query("SELECT id FROM vtipy WHERE kostka = 1"); while ($zaznam_v = MySQL_Fetch_Array($vysledek_v)){ $idv[] = $zaznam_v["id"]; $v = $zaznam_v["id"]; } SRand((double)MicroTime()*1e6); $limit = Count($idv); $rand = rand(0,$limit); $nahodna = $idv[$rand]; if(!$nahodna){$nahodna = $v;} $vysledek_vz = @MySQL_Query("SELECT * FROM vtipy WHERE id = $nahodna"); $zaznam_vz = MySQL_Fetch_Array($vysledek_vz); if(!$skin){$skin = 1;} echo" Seznamka - Vtipy pro vaše weby
Vtip na dnešek:
".$zaznam_vz["vtip"]."
Další vtip
"; /* if($HTTP_REFERER != "http://www.astroseznamka.cz/index.php?co=legracky&leg=pro_www"){ $vysledek = @mysql_query("SELECT pocet FROM vtipy_ext_stat WHERE www LIKE '$HTTP_REFERER' AND den = $den AND mes = $mes AND rok = $rok"); if(mysql_num_rows($vysledek)>0){ @mysql_query("UPDATE vtipy_ext_stat SET pocet = pocet + 1, skin = $skin WHERE www LIKE '$HTTP_REFERER' AND den = $den AND mes = $mes AND rok = $rok"); } else{ $domena = GetHostByAddr($REMOTE_ADDR); @mysql_query("INSERT INTO vtipy_ext_stat(domena, www, pocet, skin, den, mes, rok) VALUES('$domena', '$HTTP_REFERER', 1, $skin, $den, $mes, $rok)"); } } */ mysql_close($pspojeni); ?>