$0", $Text ); // Now match things beginning with www. $NotAnchor = '(?$0", $Result ); } require_once('lib/dir.php'); require_once($lib_dir."/lib.php"); require_once($lib_dir."/db_connect.php"); if (isset($_POST['submit_type']) and ($_POST['submit_type']=='bela')) { $hibauzenetek=array(); if ($_POST['nev']=='') { array_push($hibauzenetek,"A neved meg kell adnod!"); } if ($_POST['email']=='') { array_push($hibauzenetek,"Az e-mail címed meg kell adnod!"); } else { $email=$_POST['email']; if (!emailCheck($email)) { array_push($hibauzenetek,"A megadott e-mail cím ('".$email."') hibás!"); $email=""; } } if ($_POST['szoveg']=="") { array_push($hibauzenetek,"Nem is írtál semmit!"); } } if ((preg_match("/^\d+$/",$_GET['id']))and($_POST['submit_type']=='bela')and(count($hibauzenetek)==0)) { $ip=$_SERVER["REMOTE_ADDR"]; $host=gethostbyaddr($ip); $forum_tema=execQueryToOneArray("SELECT nev FROM forum_tema WHERE id='".$_GET['id']."'"); $insert_query=" INSERT INTO forum ( nev, email, szoveg, datum, elozmeny_id, ip, host, forum_tema_id ) VALUES ( '".sqlValue($_POST['nev'])."', '".sqlValue($_POST['email'])."', '".sqlValue($_POST['szoveg'])."', NOW(), '".sqlValue($_POST['elozmeny'])."', '$ip', '$host', '".sqlValue($_GET['id'])."' )"; // echo $insert_query; $uzenet="feladó: ".textInputValue($_POST['nev'])." [".textInputValue($_POST['email'])."] téma: ".$forum_tema['nev']." szöveg: ".textInputValue($_POST['szoveg']); level_kuldes("viztorony@viztorony.hu","viztorony.hu/forum","forum@viztorony.hu","Víztornyos Fórum","új hozzászólás (viztorony.hu) - ".$forum_tema['nev'],$uzenet); $x=execQuery($insert_query); header("Location: ".$_SERVER['PHP_SELF']."?id=".$_GET['id']); die; } if (($_GET['id']=='uj')and($_POST['topik']!='')) { $insert_query=" INSERT INTO forum_tema ( nev ) VALUES ( '".sqlValue($_POST['topik'])."' )"; // echo $insert_query; $x=execQuery($insert_query); $uj_id=mysql_insert_id(); header('Location: '.$_SERVER['PHP_SELF']."?id=".$uj_id); die; } $conditions=array(); array_push($conditions,"(1=1)"); if ($_GET['q']!='') { array_push($conditions,"(MATCH (forum.nev,forum.szoveg) AGAINST ('".sqlValue($_GET['q'])."' IN BOOLEAN MODE))"); } if (($_GET['q']!='')and($_GET['id']=='all')) { $forum_tema=array('nev'=>'Keresés az összes fórumban'); } elseif (preg_match("/^\d+$/",$_GET['id'])) { $forum_tema_id=$_GET['id']; array_push($conditions,"(forum.forum_tema_id='".sqlValue($forum_tema_id)."')"); $forum_tema_query=" SELECT forum_tema.* FROM forum_tema WHERE id='".sqlValue($forum_tema_id)."'"; $forum_tema=execQueryToOneArray($forum_tema_query); } else { $forum_tema_query=" SELECT forum_tema.id, max(forum.datum) AS maxdatum, forum_tema.* FROM forum_tema LEFT JOIN forum ON forum_tema.id=forum.forum_tema_id GROUP BY forum_tema.id ORDER BY maxdatum DESC LIMIT 1"; $forum_tema=execQueryToOneArray($forum_tema_query); $forum_tema_id=$forum_tema['id']; array_push($conditions,"(forum.forum_tema_id='".sqlValue($forum_tema_id)."')"); $forum_tema_query=" SELECT forum_tema.* FROM forum_tema WHERE id='".sqlValue($forum_tema_id)."'"; $forum_tema=execQueryToOneArray($forum_tema_query); } $conditions_string=implode(" AND ",$conditions); $oldal=($_GET['oldal']!='')?$_GET['oldal']:1; $forum_count_query=" SELECT count(id) AS count FROM forum WHERE ".$conditions_string; $forum_count_db=execQueryToArrays($forum_count_query); $forum_count=$forum_count_db[0]['count']; $hozzaszolasok_oldalankent=12; $mettol=($oldal-1)*$hozzaszolasok_oldalankent; $oldal_count=ceil($forum_count/$hozzaszolasok_oldalankent); $hozzaszolasok=execQueryToArrays(" SELECT forum.*, elozmeny.id AS elozmeny_id2, elozmeny.nev AS elozmeny_nev, elozmeny.email AS elozmeny_email, DATE_FORMAT(elozmeny.datum,'%Y.%m.%d. %H:%i') AS elozmeny_datum2, DATE_FORMAT(forum.datum,'%Y.%m.%d. %H:%i') AS datum2, forum_tema.nev AS forum_tema_nev FROM forum LEFT JOIN forum AS elozmeny ON forum.elozmeny_id=elozmeny.id LEFT JOIN forum_tema ON forum.forum_tema_id=forum_tema.id WHERE ".$conditions_string." ORDER BY id DESC LIMIT $mettol, $hozzaszolasok_oldalankent "); ?> Víztorony.hu
név:
e-mail:
szöveg:
 
hozzászólok

0) { ?>

Figyi!
ˇ
Téma:
[]
",InsertLinks($hozzaszolasok[$a]['szoveg']))?>
Főoldal | Lap teteje | Moderálási alapelv: mindet törlök, ami nem tetszik :o)
Keresés a fórumban:
keresek