HROBONKA VITAJTE   Dnes je '.den(date("w")).', '.date("j. "). mesiac(date("n")).'
'; include 'main/names.php'; echo Meniny(date("z")); ?>
Vstúpte

Posledné zmeny

Názory

Posledný príspevok: '.substr($lastMsg, 0, strrpos($lastMsg, ".")+1).' '; echo substr($lastMsg, strrpos($lastMsg, ",")+2, strlen($lastMsg)); echo '
Téma: '.$topic; echo '
Od: '.$autor.'   čítaj...'; ?>

Trošku slovenčiny ...

'.$nadpisSvk.'
'.$textSvk.'

Zdroj: Slovenský rozhlas

'; ?>
       
'; $i=0; while ($row = mysql_fetch_row($result)) { if ((strpos($row[0], "1")===false && strpos($row[0], "2")===false && strpos($row[0], "3")===false && strpos($row[0], "4")===false) || strpos($row[0], "2")==3) { if ($row[0]!='wuvod') { $date = getdate(strtotime($row[11])); $date = $date['mday'].'.'.$date['mon'].'. '.AddZero($date['hours']).':'.AddZero($date['minutes']); } else { $date = $update; } $table = IdentifyTable($row[0]); if ($table) { if ($i%2==0 && $i!=0) echo ''; if (strtolower($row[0]) == 'tk_2c') echo '

'.$table.'

Týždeň od: '.GetLastWeek().''; else echo '

'.$table.'

Posledné zmeny: '.$date.''; $i++; } } } if ($i%2==0) echo ''; else echo ' '; } } } function IdentifyTable($table) { //$TABLES = array("pisomky", "tk_1c", "triedy", "tyzden", "vyhl", "wkon", "wnaz", "wpr", "wrod", "wstud", "wuvod", "wvyhl"); //$TableName = array("Písomky", "Triedna kniha", "Triedy", "Tyždeň", "Vyhláška", "Kontakt", "Názory", "Predmety", "Pre rodičov", "Pre študentov", "Úvod", "Vyhláška č. 508/2009"); $TABLES = array("wuvod", "tk_2c", "vyhl"); $TableName = array('Aktuality', 'Dochádzka študentov 2.C', 'Termíny - Vyhláška č. 508/2009'); for ($i=0 ; $i<12 ; $i++) if ($TABLES[$i] == strtolower($table)) return ($TableName[$i]); return false; } function AddZero($time) { if ($time<10) return '0'.$time; else return $time; } function Slovak($n) { global $connection, $dbName, $nadpisSvk, $textSvk; if ($connection) { mysql_select_db($dbName); $data = mysql_query("SELECT * FROM slovak", $connection); if ($data) { $n = $n%mysql_num_rows($data); mysql_data_seek($data, $n); $row = mysql_fetch_row($data); $nadpisSvk = $row[1]; $textSvk = $row[2]; mysql_free_result($data); } } } function GetLastWeek() { global $connection, $dbName; if ($connection) { mysql_select_db($dbName); $data = mysql_query("SELECT * FROM tyzden ORDER by id ASC", $connection); if ($data) { mysql_data_seek($data, mysql_num_rows($data)-1); $row = mysql_fetch_row($data); $lastWeek = $row[1]; mysql_free_result($data); return $lastWeek; } } } function LastMessage() { global $connection, $dbName, $lastMsg, $autor, $topic, $topicID; if ($connection) { mysql_select_db($dbName); $data = mysql_query("SELECT * FROM wnaz ORDER by id ASC", $connection); if ($data) { mysql_data_seek($data, mysql_num_rows($data)-1); $row = mysql_fetch_row($data); $autor = $row[2]; $lastMsg = $row[4]; $topicID = $row[5]; mysql_free_result($data); $data = mysql_query("SELECT topic FROM temy WHERE id='$topicID'", $connection); // $row = mysql_result($data); if ($data) { $row = mysql_fetch_object($data); $topic = $row->topic; mysql_free_result($data); } } } } function den($nDen) { switch ($nDen) { case 0: return("nedeľa"); break; case 1: return("pondelok"); break; case 2: return("utorok"); break; case 3: return("streda"); break; case 4: return("štvrtok"); break; case 5: return("piatok"); break; case 6: return("sobota"); break; } } function mesiac($nMesiac) { switch ($nMesiac) { case 1: return("januára"); break; case 2: return("februára"); break; case 3: return("marca"); break; case 4: return("apríla"); break; case 5: return("mája"); break; case 6: return("júna"); break; case 7: return("júla"); break; case 8: return("augusta"); break; case 9: return("septembra"); break; case 10: return("októbra"); break; case 11: return("novembra"); break; case 12: return("decembra"); break; } } ?>