0) { $r = mysql_fetch_row($res); $u_id = $r[0]; $u_name = $r[1]; $u_flags = $r[2] | $UF_LOGGED_IN; $u_realname = ($r[5] == "") ? "" : $r[3].' '.$r[4]; mysql_query("UPDATE 4f_users SET last_visit = NOW(), online = 1 WHERE id = $u_id"); } else { /* print("

login failed.

"); */ } } mysql_query("UPDATE 4f_users SET online = 0 WHERE (online = 1) AND ((NOW() - last_visit) > 7200)"); /* Odtialto je user uz plne lognuty */ require('mailbox_actions.php'); require('ankety_actions.php'); $unread_mail = 0; if ($u_flags & $UF_LOGGED_IN) { $res = mysql_query("SELECT COUNT(*) FROM 4f_mail WHERE rcpt='$u_id' AND unread"); $r = mysql_fetch_row($res); $unread_mail = $r[0]; } if (@$_POST['action'] == "addnews" && ($u_flags & $UF_ADMIN)) { mysql_query("INSERT INTO 4f_novinky (data, datum, user) VALUES ('".$_POST['data']."', '".date("YmdHis")."', '$u_name')"); } if (isset($_POST['titulka']) && ($u_flags & $UF_ADMIN)) { $f = fopen('titulka.txt', 'w'); fwrite($f, stripslashes($_POST['titulka'])); fclose($f); } $css = 'default'; if ($u_flags & $UF_LOGGED_IN) { if(@$_GET['action'] == 'css') { $css = $_GET['id']; if (preg_match('/^[a-z]+$/', $css)) { mysql_query("UPDATE 4f_users SET css = '$css' WHERE id = $u_id"); } } $result = mysql_query("SELECT css FROM 4f_users WHERE id = $u_id"); $r = mysql_fetch_row($result); $css = $r[0]; } /* Prasacina, ja viem, niekedy to snad prehodim do DB :) */ if (isset($_GET['p'])) switch ($_GET['p']) { case 'kontakty': $title = 'Kontakty'; break; case 'nastenka': if (isset($_GET['typ'])) { switch ($_GET['typ']) { case 'nastenka': $title = 'Nástenka'; break; case 'log': $title = 'Logy'; break; } } break; case 'akcie': $title = 'Akcie'; break; case 'urlhash': $title = 'Linky'; break; case 'bang': $title = 'Bang - návod'; break; case 'news': $title = 'Novinky'; break; case 'chpass': $title = 'Zmena hesla'; break; case 'mailbox': $title = 'Prijaté správy'; break; case 'compose': $title = 'Odoslanie správy'; break; case 'addnews': $title = 'Pridanie novinky'; break; case 'hits': $title = 'Výpis prístupov'; break; case 'main': $title = 'Úvodná stránka'; break; case 'hosts': $title = 'IRC host search'; break; case 'outbox': $title = 'Odoslané správy'; break; case 'title': $title = 'Editácia titulky'; break; case 'ankety': $title = 'Ankety'; break; case 'video': $title = 'Video'; break; case 'album': $title = 'Album'; break; case 'fotky': $title = 'Fotky'; break; case 'newalbum': $title = 'Nový album'; break; case 'mkalbum': $title = 'Nový album'; break; case 'admalbum': $title = 'Administrácia albumu'; break; default: $title = isset($_GET['p']) ? $_GET['p'] : ""; break; } if (!isset($title) || $title == "") $title = 'Úvodná stránka'; $title = '4.F @ GK2-PO: 2001-2005 - '.$title; ?> $title\n"); ?> "); print("\t"); if ($ie_hack) print("\t".''."\n"); ?>
'); print("Nalogovaný: $u_name
\n"); if ($u_realname != "") print("$u_realname
"); ?>
'.$txt.''."\n"); if ($unread_mail > 0) print('
Mas neprecitane spravy ('.$unread_mail.' ks)!
'); ?>