"; } else { $vlastnost = "$krajina - rast"; } echo "
$krajina $pole[0] $pole[1] $vlastnost
"; } } } /** * @return void * @desc hodnotenie referatov */ function hodnotenie_ref($id,$cat) { $vypis = mysql_query("select id,ref_id,znamka from hodnotenie_ref where ref_id=$id"); $pocet_hod = mysql_NumRows($vypis); while ($pole = mysql_fetch_row($vypis)) { $hodnotenie += $pole[2]; } $vysledok_hod=$hodnotenie/$pocet_hod; $round_vys=round($vysledok_hod, 2); echo " "; if ($round_vys <= 1.4) { echo "vynikajúce ($round_vys)"; } elseif (($round_vys > 1.4) && ($round_vys <= 2.4)) { echo "dosť dobré ($round_vys)"; } elseif (($round_vys > 2.4) && ($round_vys <= 3.4)) { echo "dobré ($round_vys)"; } elseif (($round_vys > 3.4) && ($round_vys <= 4.4)) { echo "zlé ($round_vys)"; } else { echo "dosť zlé ($round_vys)"; } echo "
"; $hodnotenie=0; $vysledok_hod=0; $round_vys=0; $pocet_hod=0; } /** * @return void * @param unknown $kolko * @desc hodnota znamena kolko chceme zobrazit referatov */ function najnovsie_ref($kolko) { $vypis1 = mysql_query("select id,kategoria,nazov,nadpis,text,povolenie,cool_uri,znamka,citanost,z2 from ref where povolenie='1' order by id DESC LIMIT 0,$kolko"); //bude vypisovat vsetky udaje z db while ($pole1 = mysql_fetch_row($vypis1)) { $skratene=substr($pole1[3], 0, 400); echo "
$pole1[2]
čítanosť: $pole1[8] | známka: $pole1[9]
$skratene...

"; } } function najnovsie_spravy($kolko,$kategoria){ $datumm=Date("d.m.y"); $vypis1 = mysql_query("select id,kategoria,title,link,description,pubDate from spravy where ( pubDate like '%$datumm%') AND kategoria=$kategoria order by id DESC LIMIT 0,$kolko"); //bude vypisovat vsetky udaje z db while ($pole1 = mysql_fetch_row($vypis1)){ $skratene=substr($pole1[2], 0, 35); echo "sipka$skratene...
"; } } /** * @return void * @param unknown $kolko * @desc kolko chceme zobrazit */ function dalsie($kolko) { $id_kategorie=$_GET['cat']; $vypis_dalsie = mysql_query("SELECT id, kategoria, nazov from ref WHERE kategoria=$id_kategorie ORDER BY id DESC LIMIT 0,$kolko"); //bude vypisovat vsetky udaje z db while ($pole = mysql_fetch_row($vypis_dalsie)) { $skratene=substr($pole[2], 0, 25); echo "sipka$skratene ...
"; } } function pocty($kde,$id_kategorie) { $pocet = mysql_query("select count(*) as pocet FROM $kde where kategoria = '$id_kategorie'"); $pocet_udaj = mysql_fetch_array($pocet); $pocet_sum = $pocet_udaj["pocet"]; echo "$pocet_sum"; } function vypis_kat_katalog($id_kategorie) { $vypis = mysql_query("select id,nazov from subcat WHERE id_kategorie=$id_kategorie LIMIT 0,3"); //bude vypisovat vsetky udaje z db while ($pole = mysql_fetch_row($vypis)){ echo "$pole[1], "; } } function vypis_box_spravy($id_kategorie) { $datumm=Date("d.m.y"); $vypis = mysql_query("select id,kategoria,title,link,description,pubDate from spravy where ( pubDate like '%$datumm%') AND kategoria=$id_kategorie order by id DESC LIMIT 0,1"); //bude vypisovat vsetky udaje z db while ($pole1 = mysql_fetch_row($vypis)){ echo "$pole1[2]
$pole1[2]

"; } $vypis = mysql_query("select id,kategoria,title,link,description,pubDate from spravy where ( pubDate like '%$datumm%') AND kategoria=$id_kategorie order by id DESC LIMIT 1,5"); //bude vypisovat vsetky udaje z db while ($pole1 = mysql_fetch_row($vypis)){ $skratene=substr($pole1[2], 0, 40); echo "sipka$skratene
"; } } function kategorie_vyhladavania($tabulka) { $vypis=mysql_query("SELECT * FROM $tabulka ORDER BY nazov"); while($pole=mysql_fetch_array($vypis)) { echo "