XtGem Forum catalog
"); echo ""; ?> "; echo "

"; echo "\"*\"/
"; echo "Eroare, nu se poate conecta la baza d date!

"; echo "Aceasta eroare apare de obicei cand care serverul isi va reveni in cateva secunde!Daca problema persista va rugam sa luati legatura cat mai curand posibil cu Aud Culori

"; echo "Va multumim foarte mult pentru intelegere!"; echo "

"; echo ""; echo "
"; exit(); } $brws = explode(" / ",$HTTP_USER_AGENT); $ubr = $brws[0]; $uip = getip(); $action = $_GET["action"]; $sid = $_GET["sid"]; $page = $_GET["page"]; $who = $_GET["who"]; $uid = getuid_sid($sid); cleardata(); if(isipbanned($uip,$ubr)) { if(!isshield(getuid_sid($sid))) { echo ""; echo "

"; echo "\"x\"/
"; echo "Acest IP este blocat!
"; echo "
"; echo "Acest browser a fost banat!Daca ai scutul actiat incearca sa te loghezi!

"; $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM lib3rtymrc_penalties WHERE penalty='2' AND ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 ")); //echo mysql_error(); $remain = $banto[0] - time(); $rmsg = gettimemsg($remain); echo "Timp ramas pana la debanarea IP-ului: $rmsg

"; echo "

"; echo "

"; echo "Numele:
"; echo "Parola:
"; echo "Autentificare"; echo ""; echo ""; echo ""; echo "

"; echo "
"; echo ""; exit(); } } if(($action != "") && ($action!="forum")) { $uid = getuid_sid($sid); if((islogged($sid)==FALSE)||($uid==0)) { echo ""; echo "

"; echo "\"X\"/Nu esti autentificat
"; echo "Sau sesiunea ta a expirat

"; echo "»Autentificare«"; echo "

"; echo "
"; echo ""; exit(); } } //echo isbanned($uid); if(isbanned($uid)) { echo ""; echo "

"; echo "\"x\"/
"; echo "Esti Banat(a)
"; $banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM lib3rtymrc_penalties WHERE uid='".$uid."' AND penalty='1' OR uid='".$uid."' AND penalty='2'")); $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM lib3rtymrc_users WHERE id='".$uid."'")); $remain = $banto[0]- time(); $rmsg = gettimemsg($remain); echo "Timp ramas pana la debanare: $rmsg
"; $nick = getnick_uid($banto[2]); echo "By: $nick
"; echo "Motiv ban: $banres[0]"; //echo "Login"; echo "

"; echo "
"; echo ""; exit(); } if(isforumban($uid)) { echo ""; echo "

"; echo "\"x\"/"; echo "Esti Banat(a) pe acest serviciu
"; $banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM lib3rtymrc_penalties WHERE uid='".$uid."' AND penalty='3'")); $remain = $banto[0]- time(); $rmsg = gettimemsg($remain); echo "Timp ramas pana la debanare: $rmsg
"; $nick = getnick_uid($banto[2]); echo "By: $nick
"; $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM lib3rtymrc_users WHERE id='".$uid."'")); echo "Motiv ban: $banres[0]
"; //echo "Login"; echo "\"*\"/"; echo "Prim"; echo "

"; echo "
"; echo ""; exit(); } ///////////////////////////////////time $res = mysql_fetch_array(mysql_query("SELECT lastact FROM lib3rtymrc_users WHERE id='".$uid."'")); $lastact = $res[0]; $atime = time() - $lastact; if($atime<1800){ $res = mysql_fetch_array(mysql_query("SELECT otime FROM lib3rtymrc_users where id='".$uid."'")); $otime = $res[0] + $atime; $res = mysql_query("UPDATE lib3rtymrc_users SET otime='".$otime."' where id='".$uid."'"); } /// $altm = time()-(5*60*60); $res = mysql_query("DELETE FROM lib3rtymrc_rpg WHERE timesent<'".$altm."'"); /*$date = "".date("D d M y - ").""; $check = ((stristr($date, "30")) ? "1" : "0" ); if($check==1) { $res = mysql_fetch_array(mysql_query("SELECT battlep FROM lib3rtymrc_users WHERE id='".$uid."'"));*/ // conectati forum // addtoforum($uid); // pana aici // ////////////////////////////////////////MAIN PAGE if($action=="forum") { addonline(getuid_sid($sid),"Forum","forum.php?action=$action"); //saveuinfo($sid); echo ""; echo "

"; $uid = getuid_sid($sid); $unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_popups WHERE unread='1' AND touid='".$uid."'")); if ($unreadpopup[0]>0) { echo popup($sid); echo "

"; echo "
"; echo ""; exit(); } echo "

"; ////// echo "

"; //last post //"SELECT * FROM lib3rtymrc_posts ORDER BY dtpost DESC LIMIT 0 , 1" $lp = mysql_fetch_array(mysql_query("SELECT * FROM lib3rtymrc_posts ORDER BY dtpost DESC LIMIT 0,1")); $tname = gettname($lp[2]); $tname = str_replace("<","",$tname); $tname = str_replace(">","",$tname); $tname = str_replace("/","",$tname); $tname = str_replace("\"","",$tname); $uname = getnick_uid($lp[3]); echo "\".\"/Ultima postare in topicul $tname
De ".getsimbol($lp[3])."$uname

"; //include("lastpost.php"); echo "

"; echo "

"; $chatters=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_onlineforum")); echo "\".\"/Conectati forum:($chatters[0])
"; $fcats = mysql_query("SELECT id, name FROM lib3rtymrc_fcats ORDER BY position, id"); $iml = "\".\"/"; while($fcat=mysql_fetch_array($fcats)) { $catlink = "$iml [»] $fcat[1]"; echo "
$catlink"; $forums = mysql_query("SELECT id, name FROM lib3rtymrc_forums WHERE cid='".$fcat[0]."' AND clubid='0' ORDER BY position, id, name"); if(getfview()==0) { //echo "
"; echo "
"; while($forum=mysql_fetch_array($forums)) { if(canaccess(getuid_sid($sid),$forum[0])) { echo "\".\"/$forum[1]
"; } } //echo "
"; }else if(getfview()==20) { echo "
Forums: "; echo "[GO]"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } } echo "

"; echo "

"; echo ""; echo "-------
"; echo "\"*\"/Prim
"; echo "

"; echo "

"; echo ""; } //////////////////////////////conectati else if ($action=="conectati") { echo ""; echo "

"; addonline(getuid_sid($sid),"Conectati Forum","forum.php?action=$action"); $inside=mysql_query("SELECT DISTINCT * FROM lib3rtymrc_onlineforum WHERE uid IS NOT NULL"); while($ins=mysql_fetch_array($inside)) { $unick = getnick_uid($ins[1]); $simbol = getsimbol($ins[1]); $userl = "»$simbol$unick"; // $plc = mysql_fetch_array(mysql_query("SELECT place FROM lib3rtymrc_online WHERE userid='".$ins[1]."'")); $uact = "- $plc[0]
"; echo "$userl$uact"; } echo "
"; echo "\".\"/meniu forum
"; echo "\".\"/meniu prim
"; echo "

"; echo "
"; } //////////////////////////////////View category else if($action=="viewcat") { $cid = $_GET["cid"]; $cinfo = mysql_fetch_array(mysql_query("SELECT name from lib3rtymrc_fcats WHERE id='".$cid."'")); addonline(getuid_sid($sid),"Vizualizeaza categorie $cinfo[0]",""); echo ""; echo "

"; $uid = getuid_sid($sid); $unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_popups WHERE unread='1' AND touid='".$uid."'")); if ($unreadpopup[0]>0) { echo popup($sid); echo "

"; echo "
"; echo ""; exit(); } echo "

"; echo "

"; $forums = mysql_query("SELECT id, name FROM lib3rtymrc_forums WHERE cid='".$cid."' AND clubid='0' ORDER BY position, id, name"); echo ""; while($forum = mysql_fetch_array($forums)) { if(canaccess(getuid_sid($sid), $forum[0])) { $notp = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_topics WHERE fid='".$forum[0]."'")); $nops = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_posts a INNER JOIN lib3rtymrc_topics b ON a.tid = b.id WHERE b.fid='".$forum[0]."'")); $iml = "\".\"/"; echo "$iml$forum[1] ($notp[0]/$nops[0])
"; $lpt = mysql_fetch_array(mysql_query("SELECT id, name FROM lib3rtymrc_topics WHERE fid='".$forum[0]."' ORDER BY lastpost DESC LIMIT 0,1")); $nops = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_posts WHERE tid='".$lpt[0]."'")); if($nops[0]==0) { $pinfo = mysql_fetch_array(mysql_query("SELECT authorid FROM lib3rtymrc_topics WHERE id='".$lpt[0]."'")); $tluid = $pinfo[0]; }else{ $pinfo = mysql_fetch_array(mysql_query("SELECT uid FROM lib3rtymrc_posts WHERE tid='".$lpt[0]."' ORDER BY dtpost DESC LIMIT 0, 1")); $tluid = $pinfo[0]; } $tlnm = htmlspecialchars($lpt[1]); $tlnick = getnick_uid($tluid); $tpclnk = "$tlnm"; $vulnk = "".getsimbol($tluid)."$tlnick"; echo "Ultima postare: $tpclnk de: $vulnk

"; } } echo "
"; echo "

"; echo "

"; $tmsg = getpmcount(getuid_sid($sid)); $umsg = getunreadpm(getuid_sid($sid)); if($umsg>0) { echo "»Aveti $umsg PMs
"; } echo "\"*\"/"; echo "Forum
"; echo "\"*\"/"; echo "Prim"; echo "

"; echo ""; } //////////////////////////////////View Topic else if($action=="viewtpc") { $tinfo = mysql_fetch_array(mysql_query("SELECT name, text, authorid, crdate, views, fid, pollid from lib3rtymrc_topics WHERE id='".$tid."'")); $tnm = htmlspecialchars($tinfo[0]); addonline(getuid_sid($sid),"Vizualizare topic $tnm",""); $tid = $_GET["tid"]; $go = $_GET["go"]; $tfid = mysql_fetch_array(mysql_query("SELECT fid FROM lib3rtymrc_topics WHERE id='".$tid."'")); if(!canaccess(getuid_sid($sid), $tfid[0])) { echo ""; echo "

"; // include("popups.php"); echo "Ne pare rau dar nu ai permisiunea pentru a vedea continutul acestui forum!

"; echo "Prim"; echo "

"; echo "
"; echo ""; exit(); } $tinfo = mysql_fetch_array(mysql_query("SELECT name, text, authorid, crdate, views, fid, pollid from lib3rtymrc_topics WHERE id='".$tid."'")); $tnm = htmlspecialchars($tinfo[0]); echo ""; echo "

"; $num_pages = getnumpages($tid); if($page==""||$page<1)$page=1; if($go!="")$page=getpage_go($go,$tid); $posts_per_page = 5; if($page>$num_pages)$page=$num_pages; $limit_start = $posts_per_page *($page-1); echo "Posteaza raspuns"; $lastlink = "
Ultima pagina"; $firstlink = "
Prima pagina"; $golink = ""; if($page>1) { $golink = $firstlink; } if($page<$num_pages) { $golink .= $lastlink; } if($golink !="") { echo "$golink"; } echo "

"; echo "

"; $vws = $tinfo[4]+1; $rpls = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_posts WHERE tid='".$tid."'")); echo "Raspunsuri: $rpls[0] - Vizualizari: $vws
"; $select = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM lib3rtymrc_abonati WHERE topic='".$tid."'")); echo "Membri Abonati: $select[0]
"; echo "Aboneaza-te la topic
"; echo "Dezaboneaza-te de la topic
"; $tid = $_GET["tid"]; echo "Link: [topic=$tid]topic[/topic]
"; $uid = getuid_sid($sid); $abonat = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT necitit) FROM lib3rtymrc_abonati WHERE uid='".$uid."' AND topic='".$tid."'")); if($abonat[0]==1) { echo "Sunteti abonat la acest topic
"; $chread = mysql_query("UPDATE lib3rtymrc_abonati SET necitit='0' WHERE uid='".$uid."' AND topic='".$tid."'"); } if($page==1) { $posts_per_page=4; mysql_query("UPDATE lib3rtymrc_topics SET views='".$vws."' WHERE id='".$tid."'"); $ttext = mysql_fetch_array(mysql_query("SELECT authorid, text, crdate, pollid FROM lib3rtymrc_topics WHERE id='".$tid."'")); $unick = getnick_uid($ttext[0]); if(isonline($ttext[0])) { $iml = "\"+\"/"; }else{ $iml = "\"-\"/"; } $usl = "
$iml".getsimbol($ttext[0])."$unick"; $topt = "optiuni topic"; if($go==$tid) { $fli = "\"!\"/"; }else{ $fli =""; } $pst = parsemsg($ttext[1],$sid); echo "$usl: $fli$pst
"; $dtot = date("d.m.y,H:i:s",$ttext[2]); echo "$dtot $topt"; echo "
"; if($ttext[3]>0) { echo "Chestionar
"; } } if($page>1) { $limit_start--; } $sql = "SELECT id, text, uid, dtpost, quote FROM lib3rtymrc_posts WHERE tid='".$tid."' ORDER BY dtpost LIMIT $limit_start, $posts_per_page"; $posts = mysql_query($sql); while($post = mysql_fetch_array($posts)) { $unick = getnick_uid($post[2]); if(isonline($post[2])) { $iml = "\"+\"/"; }else{ $iml = "\"-\"/"; } $usl = "
$iml ".getsimbol($post[2])."$unick"; $pst = parsemsg($post[1], $sid); $topt = "optiuni"; if($post[4]>0) { $qtl = "(quote:p=blaze,d=16-04-2006)"; } if($go==$post[0]) { $fli = "\"!\"/"; }else{ $fli =""; } echo "$usl: $fli$pst
"; $dtot = date("d.m.y-H:i:s",$post[3]); echo "$dtot $topt"; echo "
"; } ///to here echo "

"; echo "

"; echo "-----
posteaza raspuns
-----
"; echo "

"; echo "

"; $tmsg = getpmcount(getuid_sid($sid)); $umsg = getunreadpm(getuid_sid($sid)); if($umsg>0) { echo "\"*\"/Aveti $umsg PMs
"; } if($page>1) { $ppage = $page-1; echo "pagina anterioara
"; } if($page<$num_pages) { $npage = $page+1; echo "pagina urmatoare»"; } echo "
Pagina $page din $num_pages
"; if($num_pages>2) { $rets = "Sari la pagina:
"; $rets .= "[Dute]"; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; echo $rets; } echo "
"; // echo "Posteaza raspuns"; echo "

"; echo "

"; $fid = $tinfo[5]; $fname = getfname($fid); $cid = mysql_fetch_array(mysql_query("SELECT cid FROM lib3rtymrc_forums WHERE id='".$fid."'")); $cinfo = mysql_fetch_array(mysql_query("SELECT name FROM lib3rtymrc_fcats WHERE id='".$cid[0]."'")); $cname = $cinfo[0]; $cid = mysql_fetch_array(mysql_query("SELECT cid FROM lib3rtymrc_forums WHERE id='".$fid."'")); if($cid[0]>0) { $cinfo = mysql_fetch_array(mysql_query("SELECT name FROM lib3rtymrc_fcats WHERE id='".$cid[0]."'")); $cname = htmlspecialchars($cinfo[0]); echo "Forum »|"; echo "$cname
"; }else{ $cid = mysql_fetch_array(mysql_query("SELECT clubid FROM lib3rtymrc_forums WHERE id='".$fid."'")); $cinfo = mysql_fetch_array(mysql_query("SELECT name FROM lib3rtymrc_clubs WHERE id='".$cid[0]."'")); $cname = htmlspecialchars($cinfo[0]); echo ""; echo "$cname Club
"; } $fname = htmlspecialchars($fname); echo "Categori$fname $tnm"; echo "
"; echo "\".\"/Prim"; echo "

"; echo "
"; } ////// membri abonati else if($action=="abonati") { addonline(getuid_sid($sid),"Vizualizeaza membri abonati",""); $tid = $_GET["tid"]; $uid = getuid_sid($sid); /////////////// faza q pagina if($page=="" || $page<=0)$page=1; $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_abonati WHERE topic='".$tid."'")); $num_items = $noi[0]; //changable $items_per_page= 10; $num_pages = ceil($num_items/$items_per_page); if(($page>$num_pages)&&$page!=1)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; /////////////////// pana aici prima parte $sql = "SELECT uid, data, necitit, topic FROM lib3rtymrc_abonati WHERE topic='".$tid."' ORDER BY uid LIMIT $limit_start, $items_per_page"; $cou = $limit_start; echo ""; $unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_private WHERE unread='1' AND touid='".$uid."'")); $pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_private WHERE touid='".$uid."'")); $unrd="[".$unreadinbox[0]."]"; if ($unreadinbox[0]>0) { echo "Ai:$unrdPMs
-----
"; } echo "

"; $items = mysql_query($sql); echo mysql_error(); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { $who = $item[0]; $user=getnick_uid($who); if(isonline($who)) { $iml = "\"+\"/"; }else{ $iml = "\"-\"/"; } if (isowner1(getuid_sid($sid))) { $link = "[x]"; } $lnk = "$iml".getsimbol($who)."$user"; $cou++; $necitit = mysql_fetch_array(mysql_query("SELECT necitit FROM lib3rtymrc_abonati WHERE uid='".$who."' AND topic='".$item[3]."'")); if($necitit[0]==1) { $syr = "are de citit"; }else{ $syr = "a citit"; } echo "$cou.$lnk - $syr $link
"; $dtot = date("d.m.y,H:i",$item[1]); echo "Abonat din: $dtot
"; } if($page>1) { $ppage = $page-1; echo "pagina urmatoare
"; } if($page<$num_pages) { $npage = $page+1; echo "pagina urmatoare»"; } echo "
Pagina $page din $num_pages
"; if($num_pages>2) { $rets = "Sari la pagina:
"; $rets .= "[Dute]"; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; echo $rets; } // }else{ echo "Nu exista membri abonati"; } echo "

"; echo "«"; echo "Inapoi la topic
"; echo "«"; echo "Prim"; echo "

"; } //////////////////////////////////View Forum else if($action=="viewfrm") { ///// $fid = $_GET["fid"]; $view = $_GET["view"]; if(!canaccess(getuid_sid($sid), $fid)) { addonline(getuid_sid($sid),"Pierdut in forumuri",""); echo ""; echo "

"; //include("popups.php"); echo "Nu ai permisiunea de a vedea continutul acestui forum

"; echo "Prim"; echo "

"; echo "
"; echo ""; exit(); } $finfo = mysql_fetch_array(mysql_query("SELECT name from lib3rtymrc_forums WHERE id='".$fid."'")); $fnm = htmlspecialchars($finfo[0]); addonline(getuid_sid($sid),"Vizualizare forum $fnm",""); echo ""; echo "

"; //include("popups.php"); /* $norf = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_rss WHERE fid='".$fid."'")); if($norf[0]>0) { echo "\"rss\"/$finfo[0] Extras
"; } */ echo "Topic nou
"; echo "Vizualizeaza: "; echo " [Efectueaza]"; echo ""; echo ""; echo ""; echo ""; echo "
"; if($view=="new") { echo "Vizualizeaza topicurile cu postari noi de la ultima vizita"; }else if($view=="myps") { echo "Vizualizeaza topicurile in care ai postat"; }else { echo "Vizualizeaza toate topicurile"; } echo "

"; echo "

"; echo ""; if($page=="" || $page<=0)$page=1; if($page==1) { ///////////pinned topics $topics = mysql_query("SELECT id, name, closed, views, pollid FROM lib3rtymrc_topics WHERE fid='".$fid."' AND pinned='1' ORDER BY lastpost DESC, name, id LIMIT 0,5"); while($topic = mysql_fetch_array($topics)) { $iml = "\"*\"/"; $iml = "*"; $atxt =""; if($topic[2]=='1') { //closed $atxt = "(X)"; } if($topic[4]>0) { $pltx = "(P)"; }else{ $pltx = ""; } $tnm = htmlspecialchars($topic[1]); $nop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_posts WHERE tid='".$topic[0]."'")); echo "$iml$pltx$tnm($nop[0])$atxt
"; } echo "
"; } $uid = getuid_sid($sid); if($view=="new") { $ulv = mysql_fetch_array(mysql_query("SELECT lastvst FROM lib3rtymrc_users WHERE id='".$uid."'")); $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_topics WHERE fid='".$fid."' AND pinned='0' AND lastpost >='".$ulv[0]."'")); } else if($view=="myps") { $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT a.id) FROM lib3rtymrc_topics a INNER JOIN lib3rtymrc_posts b ON a.id = b.tid WHERE a.fid='".$fid."' AND a.pinned='0' AND b.uid='".$uid."'")); } else{ $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_topics WHERE fid='".$fid."' AND pinned='0'")); } $num_items = $noi[0]; //changable $items_per_page= 10; $num_pages = ceil($num_items/$items_per_page); if($page>$num_pages)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; if($limit_start<0)$limit_start=0; if($view=="new") { $ulv = mysql_fetch_array(mysql_query("SELECT lastvst FROM lib3rtymrc_users WHERE id='".$uid."'")); $topics = mysql_query("SELECT id, name, closed, views, moved, pollid FROM lib3rtymrc_topics WHERE fid='".$fid."' AND pinned='0' AND lastpost >='".$ulv[0]."' ORDER BY lastpost DESC, name, id LIMIT $limit_start, $items_per_page"); } else if($view=="myps"){ $topics = mysql_query("SELECT a.id, a.name, a.closed, a.views, a.moved, a.pollid FROM lib3rtymrc_topics a INNER JOIN lib3rtymrc_posts b ON a.id = b.tid WHERE a.fid='".$fid."' AND a.pinned='0' AND b.uid='".$uid."' GROUP BY a.id ORDER BY a.lastpost DESC, a.name, a.id LIMIT $limit_start, $items_per_page"); } else{ $topics = mysql_query("SELECT id, name, closed, views, moved, pollid FROM lib3rtymrc_topics WHERE fid='".$fid."' AND pinned='0' ORDER BY lastpost DESC, name, id LIMIT $limit_start, $items_per_page"); } while($topic = mysql_fetch_array($topics)) { $nop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_posts WHERE tid='".$topic[0]."'")); $iml = "\"*\"/"; if($nop[0]>24) { $iml = "\".\"/"; } if($topic[4]=='1') { $iml = "\".\"/"; } if($topic[2]=='1') { $iml = "\".\"/"; } if($topic[5]>0) { $iml = "\"*\"/"; } $atxt =""; if($topic[2]=='1') { //closed $atxt = "(X)"; } $tnm = htmlspecialchars($topic[1]); echo "$iml$tnm($nop[0])$atxt
"; } echo "
"; echo "

"; echo "

"; $tmsg = getpmcount(getuid_sid($sid)); $umsg = getunreadpm(getuid_sid($sid)); if($umsg>0) { echo "»Aveti $umsg PMs
"; } if($page>1) { $ppage = $page-1; echo "«Inapoi "; } if($page<$num_pages) { $npage = $page+1; echo "Inainte»"; } echo "
$page/$num_pages
"; if($num_pages>2) { $rets = "Dute la pagina"; $rets .= "[Dute]"; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; echo $rets; } echo "

Topic nou
"; $cid = mysql_fetch_array(mysql_query("SELECT cid FROM lib3rtymrc_forums WHERE id='".$fid."'")); if($cid[0]>0) { $cinfo = mysql_fetch_array(mysql_query("SELECT name FROM lib3rtymrc_fcats WHERE id='".$cid[0]."'")); $cname = htmlspecialchars($cinfo[0]); echo ""; echo "$cname
"; }else{ $cid = mysql_fetch_array(mysql_query("SELECT clubid FROM lib3rtymrc_forums WHERE id='".$fid."'")); $cinfo = mysql_fetch_array(mysql_query("SELECT name FROM lib3rtymrc_clubs WHERE id='".$cid[0]."'")); $cname = htmlspecialchars($cinfo[0]); echo ""; echo "$cname Club
"; } echo "\"*\"/"; echo "Prim"; echo "

"; echo "
"; } //////////////////////////////////Topic nou else if($action=="newtopic") { $fid = $_GET["fid"]; if(!canaccess(getuid_sid($sid), $fid)) { echo ""; echo "

"; echo "Ne pare rau dar acest forum le este vizibil doar membrilor echipei!

"; echo "Prim"; echo "

"; echo "
"; echo ""; exit(); } addonline(getuid_sid($sid),"Creeaza topic nou","index.php?action=online"); echo ""; echo "

"; //include("popups.php"); if(getplusses(getuid_sid($sid))<25) { echo "\"X\"/Iti trebuiesc 25 de plusuri pentru a creea un topic!enjoy...
"; }else{ echo "Title:
"; echo "Text:
"; echo "Creare"; echo " "; echo ""; } echo "

"; $fname = getfname($fid); echo "$fname
"; echo "\"*\"/"; echo "Prim"; echo "

"; echo "
"; } //////////////////////////////////////////Post reply else if($action=="post") { $tid = $_GET["tid"]; $tfid = mysql_fetch_array(mysql_query("SELECT fid FROM lib3rtymrc_topics WHERE id='".$tid."'")); $fid = $tfid[0]; if(!canaccess(getuid_sid($sid), $fid)) { echo ""; echo "

"; echo "Nu ai permisiunea de a vedea continutul acestui forum

"; echo "Prim"; echo "

"; echo "
"; echo ""; exit(); } addonline(getuid_sid($sid),"Posteaza raspuns",""); echo ""; echo ""; echo " "; echo ""; $qut = $_GET["qut"]; echo "

"; $uid = getuid_sid($sid); $unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_popups WHERE unread='1' AND touid='".$uid."'")); if ($unreadpopup[0]>0) { echo popup($sid); echo "

"; echo "
"; echo ""; exit(); } echo "Text:
"; echo "Raspuns"; echo " "; echo ""; $fid = getfid($tid); $fname = getfname($fid); echo "

"; echo "Inapoi la topic"; echo "
"; echo "$fname
"; echo "\"*\"/"; echo "Prim"; echo "

"; echo ""; } //////////////////////////////////////////Post Options else if($action=="pstopt") { $pid = $_GET["pid"]; $page = $_GET["page"]; $fid = $_GET["fid"]; $trnick = getnick_uid($trid); addonline(getuid_sid($sid),"Optiuni postare $trnick",""); $pinfo= mysql_fetch_array(mysql_query("SELECT uid,tid, text FROM lib3rtymrc_posts WHERE id='".$pid."'")); $trid = $pinfo[0]; $tid = $pinfo[1]; $ptext = htmlspecialchars($pinfo[2]); echo ""; echo ""; echo " "; echo ""; echo "

"; echo "Optiuni postare"; echo "

"; echo "

"; $trnick = getnick_uid($trid); echo "»Trimite PM la $trnick
"; echo "»Vizualizeaza profil $trnick
"; //echo "»Quote
"; echo "»Raporteaza
"; echo "»Inapoi la topic
"; if(ismod(getuid_sid($sid))) { if(isdforums(getuid_sid($sid))) { echo "
Text: "; echo " "; echo "
Editeaza"; echo ""; echo ""; echo ""; echo ""; echo "
Sterge
"; } } echo "

"; echo "

"; echo "\"*\"/"; echo "Index Forum"; echo "

"; echo "
"; } ///////////////////////// optiuni topic (1) else if($action=="tpcopt") { $tid = $_GET["tid"]; $tinfo= mysql_fetch_array(mysql_query("SELECT name, fid, authorid, text, pinned, closed FROM lib3rtymrc_topics WHERE id='".$tid."'")); $trid = $tinfo[2]; $ttext = htmlspecialchars($tinfo[3]); $tname = htmlspecialchars($tinfo[0]); addonline(getuid_sid($sid),"Optiuni topic $tname",""); echo ""; echo ""; echo " "; echo ""; echo "

"; echo "Optiuni topic $tname

"; echo "Topic ID: $tid
"; $trnick = getnick_uid($trid); /// abonat if(getplusses(getuid_sid($sid))<10) { $abonat = mysql_fetch_array(mysql_query("SELECT topic FROM lib3rtymrc_abonati WHERE uid='".$uid."' AND topic='".$tid."'")); if($abonat[0]==0) { echo "» Aboneaza-te la topic,?
"; }else{ echo "» Dezaboneaza-te de la topic,?
"; } }else{ ///// $abonat = mysql_fetch_array(mysql_query("SELECT topic FROM lib3rtymrc_abonati WHERE uid='".$uid."' AND topic='".$tid."'")); if($abonat[0]==0) { echo "Aboneaza-te la topic,?
"; }else{ echo "»Dezaboneaza-te de la topic,?
"; } } //// pana aici /// echo "»Trimite PM la $trnick
"; echo "»Vizualizeaza profil $trnick
"; //echo "»Quote
"; echo "»Raporteaza
"; echo "»Inapoi la topic"; echo "

"; echo "

"; $plid = mysql_fetch_array(mysql_query("SELECT pollid FROM lib3rtymrc_topics WHERE id='".$tid."'")); if($plid[0]==0) { if(ismod($uid)) { echo "-------
"; echo "»Adauga chestionar
"; } }else{ if(ismod($uid)) { echo "-------
"; echo "»Sterge chestionar
"; } } echo "-------
"; if(ismod(getuid_sid($sid))) { if(isdforums(getuid_sid($sid))) { echo "
Titlu: "; echo " "; echo "
Redenumeste"; echo ""; echo ""; echo ""; echo ""; echo "
Text: "; echo " "; echo "
Editeaza"; echo ""; echo ""; echo ""; echo ""; echo "
[Sterge]
"; echo "
"; if($tinfo[5]=='1') { $ctxt = "Deschide"; $cact = "0"; }else{ $ctxt = "Inchide"; $cact = "1"; } echo "»$ctxt
"; if($tinfo[4]=='1') { $ptxt = "Coboara"; $pact = "0"; }else{ $ptxt = "Urca"; $pact = "1"; } echo "»$ptxt
"; //echo "»Quote
"; echo "
Muta la:
"; $forums = mysql_query("SELECT id, name FROM lib3rtymrc_forums WHERE clubid='0'"); echo "
"; echo "Muta"; echo ""; echo ""; echo ""; } } echo "

"; echo "

"; echo "\"*\"/"; echo "Index Forum
"; echo "\"*\"/"; echo "Prim"; echo "

"; echo "
"; } else if($action=="pltpc") { $tid = $_GET["tid"]; addonline(getuid_sid($sid),"Creare chestionar",""); echo ""; echo "

"; $unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_private WHERE unread='1' AND touid='".$uid."'")); $pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_private WHERE touid='".$uid."'")); $unrd="[".$unreadinbox[0]."]"; if ($unreadinbox[0]>0) { echo "Ai:$unrdPMs
-----
"; } if((getplusses(getuid_sid($sid))>=500)||ismod($uid)) { $pid = mysql_fetch_array(mysql_query("SELECT pollid FROM lib3rtymrc_topics WHERE id='".$tid."'")); if($pid[0] == 0) { echo "Intrebare:
"; echo "Optiunea 1:
"; echo "Optiunea 2:
"; echo "Optiunea 3:
"; echo "Optiunea 4:
"; echo "Optiunea 5:
"; echo "Creare"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; }else{ echo "\"x\"/Acest topic are deja un chestionar la fel"; } }else{ echo "\"x\"/Ai nevoie macar de 50 de plusuri pentru a crea un chestionar"; } echo "

"; echo "

"; echo "\"*\"/"; echo "Prim"; echo "

"; echo "
"; } /////////////////////////////////////////////////////////////////Chestionare else if($action=="viewtpl") { $who = $_GET["who"]; addonline(getuid_sid($sid),"Vizualizare chestionar",""); echo ""; echo "

"; $uid = getuid_sid($sid); $pollid = mysql_fetch_array(mysql_query("SELECT pollid FROM lib3rtymrc_topics WHERE id='".$who."'")); if($pollid[0]>0) { $polli = mysql_fetch_array(mysql_query("SELECT id, pqst, opt1, opt2, opt3, opt4, opt5, pdt FROM lib3rtymrc_polls WHERE id='".$pollid[0]."'")); if(trim($polli[1])!="") { $qst = parsepm($polli[1], $sid); echo $qst."

"; $vdone = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_presults WHERE uid='".$uid."' AND pid='".$pollid[0]."'")); $nov = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_presults WHERE pid='".$pollid[0]."'")); $nov = $nov[0]; if($vdone[0]>0) { $voted= TRUE; }else{ $voted = FALSE; } $opt1 = $polli[2]; if (trim($opt1)!="") { $opt1 = htmlspecialchars($opt1); $nov1 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_presults WHERE pid='".$pollid[0]."' AND ans='1'")); $nov1 = $nov1[0]; if($nov>0) { $per = floor(($nov1/$nov)*100); $rests = "Voturi: $nov1($per%)"; }else{ $rests = "Voturi: 0(0%)"; } if($voted) { $lnk = "1.$opt1 $rests
"; }else{ $lnk = "1.$opt1 $rests
"; } echo "$lnk"; } $opt2 = $polli[3]; if (trim($opt2)!="") { $opt2 = htmlspecialchars($opt2); $nov2 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_presults WHERE pid='".$pollid[0]."' AND ans='2'")); $nov2 = $nov2[0]; if($nov>0) { $per = floor(($nov2/$nov)*100); $rests = "Voturi: $nov2($per%)"; }else{ $rests = "Voturi: 0(0%)"; } if($voted) { $lnk = "2.$opt2 $rests
"; }else{ $lnk = "2.$opt2 $rests
"; } echo "$lnk"; } $opt3 = $polli[4]; if (trim($opt3)!="") { $opt3 = htmlspecialchars($opt3); $nov3 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_presults WHERE pid='".$pollid[0]."' AND ans='3'")); $nov3 = $nov3[0]; if($nov>0) { $per = floor(($nov3/$nov)*100); $rests = "Voturi: $nov3($per%)"; }else{ $rests = "Voturi: 0(0%)"; } if($voted) { $lnk = "3.$opt3 $rests
"; }else{ $lnk = "3.$opt3 $rests
"; } echo "$lnk"; } $opt4 = $polli[5]; if (trim($opt4)!="") { $opt4 = htmlspecialchars($opt4); $nov4 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_presults WHERE pid='".$pollid[0]."' AND ans='4'")); $nov4 = $nov4[0]; if($nov>0) { $per = floor(($nov4/$nov)*100); $rests = "Voturi: $nov4($per%)"; }else{ $rests = "Voturi: 0(0%)"; } if($voted) { $lnk = "4.$opt4 $rests
"; }else{ $lnk = "4.$opt4 $rests
"; } echo "$lnk"; } $opt5 = $polli[6]; if (trim($opt5)!="") { $opt5 = htmlspecialchars($opt5); $nov5 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_presults WHERE pid='".$pollid[0]."' AND ans='5'")); $nov5 = $nov5[0]; if($nov>0) { $per = floor(($nov5/$nov)*100); $rests = "Voturi: $nov5($per%)"; }else{ $rests = "Voturi: 0(0%)"; } if($voted) { $lnk = "5.$opt5 $rests
"; }else{ $lnk = "5.$opt5 $rests
"; } echo "$lnk"; } echo "".date("d m y - H:i",$polli[7]).""; }else{ echo "\"x\"/Acest user nu are chestionar"; } }else{ echo "\"x\"/Acest user nu are chestionar"; } echo "

"; echo "

"; echo "\"*\"/"; echo "Prim"; echo "

"; echo "
"; } ?> "); echo ""; ?> "; echo "

"; echo "\"*\"/
"; echo "Eroare, nu se poate conecta la baza d date!

"; echo "Aceasta eroare apare de obicei cand care serverul isi va reveni in cateva secunde!Daca problema persista va rugam sa luati legatura cat mai curand posibil cu bebelusa

"; //echo "Soon, we will offer services that doesn't depend on MySQL databse to let you enjoy our site, while the database is not connected
"; echo "Va multumim foarte mult pentru intelegere!"; echo "

"; echo ""; echo "
"; exit(); } $brws = explode(" / ",$HTTP_USER_AGENT); $ubr = $brws[0]; $uip = getip(); $action = $_GET["action"]; $sid = $_GET["sid"]; $page = $_GET["page"]; $who = $_GET["who"]; $uid = getuid_sid($sid); cleardata(); if(isipbanned($uip,$ubr)) { if(!isshield(getuid_sid($sid))) { echo ""; echo "

"; echo "\"x\"/
"; echo "Acest IP este blocat!
"; echo "
"; echo "Acest browser a fost banat!Daca ai scutul actiat incearca sa te loghezi!

"; $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM lib3rtymrc_penalties WHERE penalty='2' AND ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 ")); //echo mysql_error(); $remain = $banto[0] - time(); $rmsg = gettimemsg($remain); echo "Timp ramas pana la debanarea IP-ului: $rmsg

"; echo "

"; echo "

"; echo "Numele:
"; echo "Parola:
"; echo "Autentificare"; echo ""; echo ""; echo ""; echo "

"; echo "
"; echo ""; exit(); } } if(($action != "") && ($action!="forum")) { $uid = getuid_sid($sid); if((islogged($sid)==FALSE)||($uid==0)) { echo ""; echo "

"; echo "\"X\"/Nu esti autentificat
"; echo "Sau sesiunea ta a expirat

"; echo "»Autentificare«"; echo "

"; echo "
"; echo ""; exit(); } } /* /////////////////////////////////////////////////////////////////////// // WAPNEW.INFO bY I0nwTZz // /////////////////////////////////////////////////////////////////////// */ //echo isbanned($uid); if(isbanned($uid)) { echo ""; echo "

"; echo "\"x\"/
"; echo "Esti Banat(a)
"; $banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM lib3rtymrc_penalties WHERE uid='".$uid."' AND penalty='1' OR uid='".$uid."' AND penalty='2'")); $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM lib3rtymrc_users WHERE id='".$uid."'")); $remain = $banto[0]- time(); $rmsg = gettimemsg($remain); echo "Timp ramas pana la debanare: $rmsg
"; $nick = getnick_uid($banto[2]); echo "By: $nick
"; echo "Motiv ban: $banres[0]"; //echo "Login"; echo "

"; echo "
"; echo ""; exit(); } if(isforumban($uid)) { echo ""; echo "

"; echo "\"x\"/"; echo "Esti Banat(a) pe acest serviciu
"; $banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM lib3rtymrc_penalties WHERE uid='".$uid."' AND penalty='3'")); $remain = $banto[0]- time(); $rmsg = gettimemsg($remain); echo "Timp ramas pana la debanare: $rmsg
"; $nick = getnick_uid($banto[2]); echo "By: $nick
"; $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM lib3rtymrc_users WHERE id='".$uid."'")); echo "Motiv ban: $banres[0]
"; //echo "Login"; echo "\"*\"/"; echo "Prim"; echo "

"; echo "
"; echo ""; exit(); } $res = mysql_query("UPDATE lib3rtymrc_users SET browserm='".$ubr."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'"); ///////////////////////////////////time $res = mysql_fetch_array(mysql_query("SELECT lastact FROM lib3rtymrc_users WHERE id='".$uid."'")); $lastact = $res[0]; $atime = time() - $lastact; if($atime<1800){ $res = mysql_fetch_array(mysql_query("SELECT otime, mtime FROM lib3rtymrc_users where id='".$uid."'")); $otime = $res[0] + $atime; $mtime = $res[1] + $atime; $res = mysql_query("UPDATE lib3rtymrc_users SET otime='".$otime."', mtime='".$mtime."' where id='".$uid."'"); } $altm = time()-(5*60*60); $res = mysql_query("DELETE FROM lib3rtymrc_rpg WHERE timesent<'".$altm."'"); /*$date = "".date("D d M y - ").""; $check = ((stristr($date, "30")) ? "1" : "0" ); if($check==1) { $res = mysql_fetch_array(mysql_query("SELECT battlep FROM lib3rtymrc_users WHERE id='".$uid."'"));*/ /* /////////////////////////////////////////////////////////////////////// // WAPNEW.INFO bY I0nwTZz // /////////////////////////////////////////////////////////////////////// */ addtoforum($uid); ////////////////////////////////////////MAIN PAGE if($action=="forum") { addvisitor(); addonline(getuid_sid($sid),"Forum","forum.php?action=$action"); //saveuinfo($sid); echo ""; echo "

"; $uid = getuid_sid($sid); $unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_popups WHERE unread='1' AND touid='".$uid."'")); if ($unreadpopup[0]>0) { echo popup($sid); echo "

"; echo "
"; echo ""; exit(); } ////// echo "Forum MagicWorld ora ".date("H:i:s")."
"; $chatters=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_onlineforum")); echo "Conectati forum: $chatters[0]
"; echo "--------
"; echo "

"; echo "

"; //$cate = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM bro_tutile")); //if($cate[0]>0){ //$scoate = mysql_fetch_array(mysql_query("SELECT id, topic FROM bro_tutile ORDER BY RAND() ")); //if(ismod(getuid_sid($sid))) //{ //$sterge = " (x)"; //} //echo "Topicuri utile $sterge
"; //} //#ult tpc //$ult = mysql_fetch_array(mysql_query("SELECT ulttpc, ultpg FROM lib3rtymrc_users WHERE id='".getuid_sid($sid)."'")); //if(empty($ult[0])){ // }else{ // if($ult[1]!=""){ //echo "Ultimul topic vizitat

"; // }else{ //echo "Ultimul topic vizitat
"; // } // } // echo "
"; //#ult tpc end $fcats = mysql_query("SELECT id, name FROM lib3rtymrc_fcats ORDER BY position, id"); while($fcat=mysql_fetch_array($fcats)) { $catlink = "$iml \".\"/$fcat[1]"; echo "$catlink"; echo "
"; $forums = mysql_query("SELECT id, name FROM lib3rtymrc_forums WHERE cid='".$fcat[0]."' AND clubid='0' ORDER BY position, id, name"); if(getfview()==0) { //echo "
"; while($forum=mysql_fetch_array($forums)) { if(canaccess(getuid_sid($sid),$forum[0])) { echo "\".\"/$forum[1]
"; } } echo "
------"; }else if(getfview()==20) { echo "
Forums: "; echo "[GO]"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } } echo "

"; echo "

"; echo ""; echo "--------
"; // if (ismod(getuid_sid($sid))) /// { // echo "Ultimile 10 postari
"; // echo "--------

"; // } echo "Acasa
"; echo "

"; echo "

"; echo ""; } /* /////////////////////////////////////////////////////////////////////// // WAPNEW.INFO bY I0nwTZz // /////////////////////////////////////////////////////////////////////// */ //////////////////////////////////View category //////////////////////////////conectati else if ($action=="conectati") { addonline(getuid_sid($sid),"Conectati Forum","forum.php?action=$action"); echo ""; echo "

"; addonline(getuid_sid($sid),"Conectati Forum","forum.php?action=$action"); $inside=mysql_query("SELECT DISTINCT * FROM lib3rtymrc_onlineforum WHERE uid IS NOT NULL"); while($ins=mysql_fetch_array($inside)) { $unick = getnick_uid($ins[1]); $simbol = getsimbol($ins[1]); $userl = "\".\"/$simbol$unick"; // $plc = mysql_fetch_array(mysql_query("SELECT place FROM lib3rtymrc_online WHERE userid='".$ins[1]."'")); $uact = "- $plc[0]
"; echo "$userl$uact"; } echo "
"; echo "

"; echo "

"; echo "Forum
"; echo "Acasa
"; echo "

"; echo "
"; } else if($action=="viewcat") { $cid = $_GET["cid"]; $cinfo = mysql_fetch_array(mysql_query("SELECT name from lib3rtymrc_fcats WHERE id='".$cid."'")); addonline(getuid_sid($sid),"Vizualizeaza categorie $cinfo[0]",""); echo ""; echo "

"; echo "Categoria $cinfo[0]"; $uid = getuid_sid($sid); $unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_popups WHERE unread='1' AND touid='".$uid."'")); if ($unreadpopup[0]>0) { echo popup($sid); echo "

"; echo "
"; echo ""; exit(); } echo "

"; echo "

"; $forums = mysql_query("SELECT id, name FROM lib3rtymrc_forums WHERE cid='".$cid."' AND clubid='0' ORDER BY position, id, name"); while($forum = mysql_fetch_array($forums)) { if(canaccess(getuid_sid($sid), $forum[0])) { $notp = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_topics WHERE fid='".$forum[0]."'")); $nops = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_posts a INNER JOIN lib3rtymrc_topics b ON a.tid = b.id WHERE b.fid='".$forum[0]."'")); $iml = "\"*\"/"; echo "$iml$forum[1] ($notp[0]/$nops[0])
"; $lpt = mysql_fetch_array(mysql_query("SELECT id, name FROM lib3rtymrc_topics WHERE fid='".$forum[0]."' ORDER BY lastpost DESC LIMIT 0,1")); $nops = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_posts WHERE tid='".$lpt[0]."'")); if($nops[0]==0) { $pinfo = mysql_fetch_array(mysql_query("SELECT authorid FROM lib3rtymrc_topics WHERE id='".$lpt[0]."'")); $tluid = $pinfo[0]; }else{ $pinfo = mysql_fetch_array(mysql_query("SELECT uid FROM lib3rtymrc_posts WHERE tid='".$lpt[0]."' ORDER BY dtpost DESC LIMIT 0, 1")); $tluid = $pinfo[0]; } $tlnm = htmlspecialchars($lpt[1]); $tlnick = getnick_uid($tluid); $tpclnk = "$tlnm"; $vulnk = "".getsimbol($tluid)."$tlnick"; $notp = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_topics WHERE fid='".$forum[0]."'")); if($notp[0]<1){ echo "Forum Gol
"; }else if($notp[0]>0){ echo "Postare: $tpclnk de: $vulnk
"; } echo "----
"; } } echo "

"; echo "

"; $tmsg = getpmcount(getuid_sid($sid)); $umsg = getunreadpm(getuid_sid($sid)); if($umsg>0) { echo "Pm: $umsg
"; } echo ""; echo "Forum
"; echo ""; echo "Acasa"; echo "

"; echo ""; } //////////////////////////////////View Topic else if($action=="viewtpc") { $tinfo = mysql_fetch_array(mysql_query("SELECT name, text, authorid, crdate, views, fid, pollid from lib3rtymrc_topics WHERE id='".$tid."'")); $tnm = htmlspecialchars($tinfo[0]); addonline(getuid_sid($sid),"Vizualizare topic $tnm",""); $tid = $_GET["tid"]; $go = $_GET["go"]; $tfid = mysql_fetch_array(mysql_query("SELECT fid FROM lib3rtymrc_topics WHERE id='".$tid."'")); $idmeu = getuid_sid($sid); // addtotopic($idmeu,$tid); if(!canaccess(getuid_sid($sid), $tfid[0])) { echo ""; echo "

"; // include("popups.php"); echo "Ne pare rau dar nu ai permisiunea pentru a vedea continutul acestui forum!

"; echo "Prim"; echo "

"; echo "
"; echo ""; exit(); } $tinfo = mysql_fetch_array(mysql_query("SELECT name, text, authorid, crdate, views, fid, pollid from lib3rtymrc_topics WHERE id='".$tid."'")); $tnm = htmlspecialchars($tinfo[0]); echo ""; echo "

"; echo "Topicul $tnm
"; $unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_private WHERE unread='1' AND touid='".$uid."'")); $unrd="".$unreadinbox[0].""; if ($unreadinbox[0]==1) { echo "ai un Pm

"; } if ($unreadinbox[0]>1) { echo "ai $unrd Pm-uri

"; } $num_pages = getnumpages($tid); if($page==""||$page<1)$page=1; if($go!="")$page=getpage_go($go,$tid); $posts_per_page = 5; if($page>$num_pages)$page=$num_pages; $limit_start = $posts_per_page *($page-1); echo "scrie
"; $lastlink = "ultima pagina»"; $firstlink = "«prima pagina "; $golink = ""; if($page>1) { $golink = $firstlink; } if($page<$num_pages) { $golink .= $lastlink; } if($golink !="") { echo "$golink"; } echo "

"; echo "

"; #Ultimul Topic mysql_query("UPDATE lib3rtymrc_users SET ulttpc='".$tid."', ultpg='".$page."' WHERE id='".getuid_sid($sid)."'"); # $vws = $tinfo[4]+1; $rpls = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_posts WHERE tid='".$tid."'")); //echo "Raspunsuri: $rpls[0] - Vazut: $vws
"; // $taxa = mysql_fetch_array(mysql_query("SELECT taxa FROM lib3rtymrc_topics WHERE id='".$tid."'")); // if($taxa[0]>0) // { // echo "Taxa postare: $taxa[0] plusuri
"; // }else if($taxa[0]==0) // { // } $abonat = mysql_fetch_array(mysql_query("SELECT topic FROM lib3rtymrc_abonati WHERE uid='".$uid."' AND topic='".$tid."'")); if($abonat[0]==0) { echo "ma abonez
"; }else{ echo "ma dezabonez
"; } $select = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM lib3rtymrc_abonati WHERE topic='".$tid."'")); echo "Membri Abonati: $select[0]
"; $pinfo= mysql_fetch_array(mysql_query("SELECT authorid FROM lib3rtymrc_topics WHERE id='".$tid."'")); $trid = $pinfo[0]; if($trid==$idmeu){ echo "Admin Topic *
"; } //$conect=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM n3s_onlinetopic WHERE topic='".$tid."'")); //echo "Conectati Topic: $conect[0]
"; $tid = $_GET["tid"]; echo "Link: [topic=$tid]topic[/topic]
"; $uid = getuid_sid($sid); $abonat = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT necitit) FROM lib3rtymrc_abonati WHERE uid='".$uid."' AND topic='".$tid."'")); if($abonat[0]==1) { echo "Sunteti abonat la acest topic
"; $chread = mysql_query("UPDATE lib3rtymrc_abonati SET necitit='0' WHERE uid='".$uid."' AND topic='".$tid."'"); } ///fm here if($page==1) { $posts_per_page=4; mysql_query("UPDATE lib3rtymrc_topics SET views='".$vws."' WHERE id='".$tid."'"); $ttext = mysql_fetch_array(mysql_query("SELECT authorid, text, crdate, pollid FROM lib3rtymrc_topics WHERE id='".$tid."'")); $unick = getnick_uid($ttext[0]); if(isonline($ttext[0])) { $iml = "\"+\"/"; }else{ $iml = "\"-\"/"; } $usl = "
$iml$unick"; $topt = "*"; if($go==$tid) { $fli = "\"!\"/"; }else{ $fli =""; } $pst = parsemsg($ttext[1],$sid); echo "$usl: $fli$pst $topt
"; // lunile anului $dtot = date("d-m-y - H:i:s",$ttext[2]); echo $dtot; //echo "
"; if($ttext[3]>0) { echo "»Chestionar
"; } } if($page>1) { $limit_start--; } $sql = "SELECT id, text, uid, dtpost, quote FROM lib3rtymrc_posts WHERE tid='".$tid."' ORDER BY dtpost LIMIT $limit_start, $posts_per_page"; $posts = mysql_query($sql); while($post = mysql_fetch_array($posts)) { $unick = getnick_uid($post[2]); if(isonline($post[2])) { $iml = "\"+\"/"; }else{ $iml = "\"-\"/"; } $usl = "
$iml$unick"; $pst = parsemsg($post[1], $sid); $topt = "optiuni"; if($post[4]>0) { $qtl = "(quote:p=blaze,d=16-04-2006)"; } if($go==$post[0]) { $fli = "\"!\"/"; }else{ $fli =""; } echo "$usl: $fli$pst $topt
"; $dtot = date("d-m-y - H:i:s",$post[3]); echo $dtot; //echo "
"; } ///to here echo "

"; echo "

"; $rpls = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_posts WHERE tid='".$tid."'")); if($rpls[0]==0) { echo "Nu sunt postari in acest topic!
"; }else if($rpls[0]>0){ echo "Sunt $rpls[0] raspunsuri in acest topic!
"; } echo "scrie raspuns
"; echo "
"; echo ""; if($page>1) { $ppage = $page-1; echo "«inapoi"; } if($page<$num_pages) { $npage = $page+1; echo " | inainte»"; } echo "
Pagina $page din $num_pages
"; if($num_pages>2) { $rets = "pagina"; $rets .= "[Du-te]"; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; echo $rets; } echo "
"; // echo "Posteaza raspuns"; echo "

"; echo "

"; $fid = $tinfo[5]; $fname = getfname($fid); $cid = mysql_fetch_array(mysql_query("SELECT cid FROM lib3rtymrc_forums WHERE id='".$fid."'")); $cinfo = mysql_fetch_array(mysql_query("SELECT name FROM lib3rtymrc_fcats WHERE id='".$cid[0]."'")); $cname = $cinfo[0]; $cid = mysql_fetch_array(mysql_query("SELECT cid FROM lib3rtymrc_forums WHERE id='".$fid."'")); if($cid[0]>0) { $cinfo = mysql_fetch_array(mysql_query("SELECT name FROM lib3rtymrc_fcats WHERE id='".$cid[0]."'")); $cname = htmlspecialchars($cinfo[0]); echo "Forum»"; echo "$cname»"; }else{ $cid = mysql_fetch_array(mysql_query("SELECT clubid FROM lib3rtymrc_forums WHERE id='".$fid."'")); $cinfo = mysql_fetch_array(mysql_query("SELECT name FROM lib3rtymrc_clubs WHERE id='".$cid[0]."'")); $cname = htmlspecialchars($cinfo[0]); echo ""; echo "$cname Club
"; } $fname = htmlspecialchars($fname); echo "$fname » $tnm
"; echo ""; echo "Acasa"; echo "

"; echo "
"; } ////// membri abonati else if($action=="abonati") { addonline(getuid_sid($sid),"Vizualizeaza membri abonati",""); $tid = $_GET["tid"]; $uid = getuid_sid($sid); /////////////// faza q pagina if($page=="" || $page<=0)$page=1; $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_abonati WHERE topic='".$tid."'")); $num_items = $noi[0]; //changable $items_per_page= 6; $num_pages = ceil($num_items/$items_per_page); if(($page>$num_pages)&&$page!=1)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; /////////////////// pana aici prima parte $sql = "SELECT uid, data, necitit, topic FROM lib3rtymrc_abonati WHERE topic='".$tid."' ORDER BY uid LIMIT $limit_start, $items_per_page"; $cou = $limit_start; echo ""; $unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_private WHERE unread='1' AND touid='".$uid."'")); $pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_private WHERE touid='".$uid."'")); $unrd="[".$unreadinbox[0]."]"; if ($unreadinbox[0]>0) { echo "Ai:$unrdPMs
-----
"; } echo "

"; $items = mysql_query($sql); echo mysql_error(); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { $who = $item[0]; $user=getnick_uid($who); if(isonline($who)) { $iml = "\"+\"/"; }else{ $iml = "\"-\"/"; } if (ismod(getuid_sid($sid))) { $link = "[x]"; } $lnk = "$iml".getsimbol($who)."$user"; $cou++; $necitit = mysql_fetch_array(mysql_query("SELECT necitit FROM lib3rtymrc_abonati WHERE uid='".$who."' AND topic='".$item[3]."'")); if($necitit[0]==1) { $syr = "are de citit"; }else{ $syr = "a citit"; } echo "$cou.$lnk - $syr $link
"; $dtot = date("d.m.y,H:i",$item[1]); echo "Abonat din: $dtot
"; } if($page>1) { $ppage = $page-1; echo "pagina urmatoare
"; } if($page<$num_pages) { $npage = $page+1; echo "pagina urmatoare»"; } echo "
Pagina $page din $num_pages
"; if($num_pages>2) { $rets = "pagina:
"; $rets .= "[Du-te]"; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; echo $rets; } // }else{ echo "Nu exista membri abonati"; } echo "
"; echo ""; echo "Inapoi
"; echo "Acasa
"; echo "

"; }//////////////////////////////////View Forum else if($action=="viewfrm") { ///// $fid = $_GET["fid"]; $view = $_GET["view"]; if(!canaccess(getuid_sid($sid), $fid)) { addonline(getuid_sid($sid),"Pierdut in forumuri",""); echo ""; echo "

"; //include("popups.php"); echo "Nu ai permisiunea de a vedea continutul acestui forum

"; echo "Prim"; echo "

"; echo "
"; echo ""; exit(); } $finfo = mysql_fetch_array(mysql_query("SELECT name from lib3rtymrc_forums WHERE id='".$fid."'")); $fnm = htmlspecialchars($finfo[0]); addonline(getuid_sid($sid),"Vizualizare forum $fnm",""); echo ""; echo "

"; echo "Forumul $fnm
"; echo "Vizualizezi "; if($view=="new") { echo "Topicurile cu mesaje noi de la ultima vizita"; }else if($view=="myps") { echo "Topicurile in care am postat"; }else { echo "Toate Topicurile"; } echo "
Topic nou"; echo "

"; echo "

"; echo "Vezi: "; echo "da"; echo ""; echo ""; echo ""; echo ""; echo "
"; $select = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM ice_forum_abonati WHERE categoria='".$fid."'")); echo "Membri Abonati: $select[0]
"; echo "link direct: [forum=$fid]forum[/forum]
"; echo ""; $uid = getuid_sid($sid); $abonat = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT necitit) FROM ice_forum_abonati WHERE uid='".$uid."' AND categoria='".$fid."'")); if($abonat[0]==1) { echo "esti abonat la acest topic
"; $chread = mysql_query("UPDATE ice_forum_abonati SET necitit='0' WHERE uid='".$uid."' AND categoria='".$fid."'"); }else{ echo "nu esti abonat la acest forum
"; } $abonat = mysql_fetch_array(mysql_query("SELECT categoria FROM ice_forum_abonati WHERE uid='".$uid."' AND categoria='".$fid."'")); if($abonat[0]==0) { echo "ma abonez
"; }else{ echo "ma dezabonez
"; } echo "
"; echo ""; if($page=="" || $page<=0)$page=1; if($page==1) { ///////////pinned topics $topics = mysql_query("SELECT id, name, closed, views, pollid FROM lib3rtymrc_topics WHERE fid='".$fid."' AND pinned='1' ORDER BY lastpost DESC, name, id LIMIT 0,5"); while($topic = mysql_fetch_array($topics)) { $iml = "\"*\"/"; $iml = "*"; $atxt =""; if($topic[2]=='1') { //closed $atxt = "(X)"; } if($topic[4]>0) { $pltx = "(P)"; }else{ $pltx = ""; } $tnm = htmlspecialchars($topic[1]); $nop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_posts WHERE tid='".$topic[0]."'")); echo "$iml$pltx$tnm($nop[0])$atxt
"; } echo "
"; } $uid = getuid_sid($sid); if($view=="new") { $ulv = mysql_fetch_array(mysql_query("SELECT lastvst FROM lib3rtymrc_users WHERE id='".$uid."'")); $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_topics WHERE fid='".$fid."' AND pinned='0' AND lastpost >='".$ulv[0]."'")); } else if($view=="myps") { $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT a.id) FROM lib3rtymrc_topics a INNER JOIN lib3rtymrc_posts b ON a.id = b.tid WHERE a.fid='".$fid."' AND a.pinned='0' AND b.uid='".$uid."'")); } else{ $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_topics WHERE fid='".$fid."' AND pinned='0'")); } $num_items = $noi[0]; //changable $items_per_page= 7; $num_pages = ceil($num_items/$items_per_page); if($page>$num_pages)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; if($limit_start<0)$limit_start=0; if($view=="new") { $ulv = mysql_fetch_array(mysql_query("SELECT lastvst FROM lib3rtymrc_users WHERE id='".$uid."'")); $topics = mysql_query("SELECT id, name, closed, views, moved, pollid FROM lib3rtymrc_topics WHERE fid='".$fid."' AND pinned='0' AND lastpost >='".$ulv[0]."' ORDER BY lastpost DESC, name, id LIMIT $limit_start, $items_per_page"); } else if($view=="myps"){ $topics = mysql_query("SELECT a.id, a.name, a.closed, a.views, a.moved, a.pollid FROM lib3rtymrc_topics a INNER JOIN lib3rtymrc_posts b ON a.id = b.tid WHERE a.fid='".$fid."' AND a.pinned='0' AND b.uid='".$uid."' GROUP BY a.id ORDER BY a.lastpost DESC, a.name, a.id LIMIT $limit_start, $items_per_page"); } else{ $topics = mysql_query("SELECT id, name, closed, views, moved, pollid FROM lib3rtymrc_topics WHERE fid='".$fid."' AND pinned='0' ORDER BY lastpost DESC, name, id LIMIT $limit_start, $items_per_page"); } while($topic = mysql_fetch_array($topics)) { $nop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_posts WHERE tid='".$topic[0]."'")); $iml = "\"*\"/"; if($nop[0]>24) { $iml = "\"*\"/"; } if($topic[4]=='1') { $iml = "\"*\"/"; } if($topic[2]=='1') { $iml = "\"*\"/"; } if($topic[5]>0) { $iml = "\"*\"/"; } $atxt =""; if($topic[2]=='1') { //closed $atxt = "(X)"; } $tnm = htmlspecialchars($topic[1]); echo "$iml$tnm$atxt postari:$nop[0]
"; } echo "
"; echo "

"; echo "

"; $tmsg = getpmcount(getuid_sid($sid)); $umsg = getunreadpm(getuid_sid($sid)); if($umsg>0) { echo "PM: $umsg
"; } if($page>1) { $ppage = $page-1; echo "«Inapoi"; } if($page<$num_pages) { $npage = $page+1; echo "Inainte»"; } echo "
$page din $num_pages
"; if($num_pages>2) { $rets = "pagina"; $rets .= "[Du-te]"; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; echo $rets; } echo "
Topic nou
"; echo "

"; echo "

"; $cid = mysql_fetch_array(mysql_query("SELECT cid FROM lib3rtymrc_forums WHERE id='".$fid."'")); if($cid[0]>0) { $cinfo = mysql_fetch_array(mysql_query("SELECT name FROM lib3rtymrc_fcats WHERE id='".$cid[0]."'")); $cname = htmlspecialchars($cinfo[0]); echo "Forum»"; echo "$cname»"; $finfo = mysql_fetch_array(mysql_query("SELECT name from lib3rtymrc_forums WHERE id='".$fid."'")); $fnm = htmlspecialchars($finfo[0]); echo "$fnm
"; }else{ $cid = mysql_fetch_array(mysql_query("SELECT clubid FROM lib3rtymrc_forums WHERE id='".$fid."'")); $cinfo = mysql_fetch_array(mysql_query("SELECT name FROM lib3rtymrc_clubs WHERE id='".$cid[0]."'")); $cname = htmlspecialchars($cinfo[0]); echo ""; echo "$cname Club
"; } echo ""; echo "Acasa"; echo "

"; echo "
"; } else if($action=="abonatiforum") { addonline(getuid_sid($sid),"Vizualizeaza membri abonati",""); $fid = $_GET["fid"]; $uid = getuid_sid($sid); /////////////// faza q pagina if($page=="" || $page<=0)$page=1; $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ice_forum_abonati WHERE categoria='".$fid."'")); $num_items = $noi[0]; //changable $items_per_page= 6; $num_pages = ceil($num_items/$items_per_page); if(($page>$num_pages)&&$page!=1)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; /////////////////// pana aici prima parte $sql = "SELECT uid, data, necitit, categoria FROM ice_forum_abonati WHERE categoria='".$fid."' ORDER BY uid LIMIT $limit_start, $items_per_page"; $cou = $limit_start; echo ""; echo "

"; $forumnum = getfname($fid); echo "Lista abonatilor forumului $forumnum

"; $items = mysql_query($sql); echo mysql_error(); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { $who = $item[0]; $user=getnick_uid($who); if(isonline($who)) { $iml = "\"+\"/"; }else{ $iml = "\"-\"/"; } if (ismod(getuid_sid($sid))) { $link = "[x]"; } $lnk = "$iml".getsimbol($who)."$user"; $cou++; $necitit = mysql_fetch_array(mysql_query("SELECT necitit FROM ice_forum_abonati WHERE uid='".$who."' AND categoria='".$item[3]."'")); if($necitit[0]==1) { $syr = "are de citit"; }else{ $syr = "a citit"; } echo "$cou.$lnk - $syr $link
"; $dtot = date("d.m.y,H:i",$item[1]); echo "Abonat din: $dtot
"; } if($page>1) { $ppage = $page-1; echo "pagina urmatoare
"; } if($page<$num_pages) { $npage = $page+1; echo "pagina urmatoare»"; } echo "
Pagina $page din $num_pages
"; if($num_pages>2) { $rets = "pagina:
"; $rets .= "[Du-te]"; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; echo $rets; } // }else{ echo "Nu exista membri abonati"; } echo "
"; echo ""; echo "Inapoi
"; echo "Acasa
"; echo "

"; }//////////////////////////////////Topic nou else if($action=="newtopic") { $fid = $_GET["fid"]; if(!canaccess(getuid_sid($sid), $fid)) { echo ""; echo "

"; echo "Ne pare rau dar acest forum le este vizibil doar membrilor echipei!

"; echo "Prim"; echo "

"; echo "
"; echo ""; exit(); } addonline(getuid_sid($sid),"Creeaza topic nou","index.php?action=online"); echo ""; echo "

"; //include("popups.php"); if(getplusses(getuid_sid($sid))<25) { echo "\"X\"/Iti trebuiesc 25 de plusuri pentru a creea un topic!enjoy...
"; }else{ echo "Title:
"; echo "Text:
"; echo "Creare"; echo " "; echo ""; } echo "

"; $fname = getfname($fid); echo "$fname
"; echo "\"*\"/"; echo "Prim"; echo "

"; echo "
"; } //////////////////////////////////////////Post reply else if($action=="post") { if(validare(getuid_sid($sid))<1) { echo ""; echo "

"; echo "\"*\"/Contul tau nu a fost validat
Este necesar sa-ti completezi corect profilul
Si sa astepti validarea contului tau
"; echo "Verificarea si activarea contului dumneavoastra poate dura pana la 2 de ore, va rugam asteptati.
Va multumim!


"; echo ""; echo "Daca nu vreti sa asteptati dati add la id-ul de messenger patywap_patywap
"; echo "
"; echo ""; echo "+Setari Profil
"; echo "------
"; echo "\"*\"/ Prima Pagina

"; echo "© $sitte
"; echo "
"; echo "

"; echo "
"; echo ""; exit(); } $tid = $_GET["tid"]; $tfid = mysql_fetch_array(mysql_query("SELECT fid FROM lib3rtymrc_topics WHERE id='".$tid."'")); $fid = $tfid[0]; if(!canaccess(getuid_sid($sid), $fid)) { echo ""; echo "

"; echo "Nu ai permisiunea de a vedea continutul acestui forum

"; echo "Prim"; echo "

"; echo "
"; echo ""; exit(); } addonline(getuid_sid($sid),"Posteaza raspuns",""); echo ""; echo ""; echo " "; echo ""; $qut = $_GET["qut"]; echo "

"; $uid = getuid_sid($sid); $unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_popups WHERE unread='1' AND touid='".$uid."'")); if ($unreadpopup[0]>0) { echo popup($sid); echo "

"; echo "
"; echo ""; exit(); } //include("popups.php"); echo "Text:

"; echo "Posteaza"; echo " "; echo ""; $fid = getfid($tid); $fname = getfname($fid); echo "

"; echo "Inapoi la topic"; echo "
"; echo "$fname
"; echo ""; echo "Acasa
"; echo "

"; echo ""; } //////////////////////////////////////////Post Options else if($action=="pstopt") { $pid = $_GET["pid"]; $page = $_GET["page"]; $fid = $_GET["fid"]; $trnick = getnick_uid($trid); addonline(getuid_sid($sid),"Optiuni postare $trnick",""); $pinfo= mysql_fetch_array(mysql_query("SELECT uid,tid, text FROM lib3rtymrc_posts WHERE id='".$pid."'")); $trid = $pinfo[0]; $tid = $pinfo[1]; $ptext = htmlspecialchars($pinfo[2]); echo ""; echo ""; echo " "; echo ""; echo "

"; echo "Optiuni postare"; echo "

"; echo "

"; $eu = getuid_sid($sid); $trnick = getnick_uid($trid); if($trid=="$eu") { if(ismod($uid)) { echo "Aceasta postare face parte din topicul tau!!"; }else{echo "Acest topic iti apartine! Ai posibilitatea sa il moderezi!
"; echo "
Text: "; echo " "; echo "
Editeaza"; echo ""; echo ""; echo ""; echo ""; echo "
Sterge Postare
"; } }else { $trnick = getnick_uid($trid); echo "
-Trimite PM la $trnick
"; echo "-Vizualizeaza profil $trnick
"; echo "-Raporteaza
"; } if(ismod(getuid_sid($sid))) { if(isdforums(getuid_sid($sid))) { echo "
Text: "; echo " "; echo "
Editeaza"; echo ""; echo ""; echo ""; echo ""; echo "
Sterge Postare
"; } } echo "

"; echo "

"; echo "Inapoi la topic
"; echo ""; echo "Meniu Forum"; echo "

"; echo "
"; } else if($action=="tpcopt") { $tid = $_GET["tid"]; $trnick = getnick_uid($trid); addonline(getuid_sid($sid),"Optiuni topic $trnick",""); $tinfo= mysql_fetch_array(mysql_query("SELECT name,fid, authorid, text, pinned, closed FROM lib3rtymrc_topics WHERE id='".$tid."'")); $trid = $tinfo[2]; $ttext = htmlspecialchars($tinfo[3]); $tname = htmlspecialchars($tinfo[0]); echo ""; echo ""; echo " "; echo ""; echo "

"; echo "Optiuni topic
"; echo "ID Topic: $tid
"; $tid = $_GET["tid"]; echo "Link Topic: [topic=$tid]topic[/topic]
"; $eu = getuid_sid($sid); $trnick = getnick_uid($trid); if($trid=="$eu") { if(ismod($uid)) { echo "Acest topic iti apartine!"; }else{echo "Acest topic iti apartine! Ai posibilitatea sa il moderezi!
"; echo "
Titlu: "; echo " "; echo "
Redenumeste"; echo ""; echo ""; echo ""; echo ""; echo "
Text: "; echo " "; echo "
Editeaza"; echo ""; echo ""; echo ""; echo ""; } }else { $trnick = getnick_uid($trid); echo "
-Trimite PM la $trnick
"; echo "-Vizualizeaza profil $trnick
"; echo "-Raporteaza
"; } echo "

"; echo "

"; if(ismod(getuid_sid($sid))) { if(isdforums(getuid_sid($sid))) { echo "
Optiuni Echipa
"; echo "
Titlu: "; echo " "; echo "
Redenumeste"; echo ""; echo ""; echo ""; echo ""; echo "
Text: "; echo " "; echo "
Editeaza"; echo ""; echo ""; echo ""; echo ""; echo "
[Sterge]
"; echo "
"; if($tinfo[5]=='1') { $ctxt = "Deschide"; $cact = "0"; }else{ $ctxt = "Inchide"; $cact = "1"; } echo "»$ctxt
"; if($tinfo[4]=='1') { $ptxt = "Coboara"; $pact = "0"; }else{ $ptxt = "Urca"; $pact = "1"; } echo "»$ptxt
"; $plid = mysql_fetch_array(mysql_query("SELECT pollid FROM lib3rtymrc_topics WHERE id='".$tid."'")); if($plid[0]==0) { echo "»Adauga chestionar
"; }else{ echo "»Sterge chestionar
"; } echo "
Muta la:
"; $forums = mysql_query("SELECT id, name FROM lib3rtymrc_forums WHERE clubid='0'"); echo "
"; echo "Muta"; echo ""; echo ""; echo ""; } } echo "

"; echo "

"; echo "Inapoi la topic
"; echo ""; echo "Meniu Forum"; echo "

"; echo "
"; } /* /////////////////////////////////////////////////////////////////////// // WAPNEW.INFO bY I0nwTZz // /////////////////////////////////////////////////////////////////////// */ else if($action=="pltpc") { $tid = $_GET["tid"]; addonline(getuid_sid($sid),"Creare chestionar",""); echo ""; echo "

"; $unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_private WHERE unread='1' AND touid='".$uid."'")); $pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_private WHERE touid='".$uid."'")); $unrd="[".$unreadinbox[0]."]"; if ($unreadinbox[0]>0) { echo "Ai:$unrdPMs
-----
"; } if((getplusses(getuid_sid($sid))>=500)||ismod($uid)) { $pid = mysql_fetch_array(mysql_query("SELECT pollid FROM lib3rtymrc_topics WHERE id='".$tid."'")); if($pid[0] == 0) { echo "Intrebare:
"; echo "Optiunea 1:
"; echo "Optiunea 2:
"; echo "Optiunea 3:
"; echo "Optiunea 4:
"; echo "Optiunea 5:
"; echo "Creare"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; }else{ echo "\"x\"/Acest topic are deja un chestionar la fel"; } }else{ echo "\"x\"/Ai nevoie macar de 50 de plusuri pentru a crea un chestionar"; } echo "

"; echo "

"; echo "\"*\"/"; echo "Prim"; echo "

"; echo "
"; } /////////////////////////////////////////////////////////////////Chestionare else if($action=="viewtpl") { $who = $_GET["who"]; addonline(getuid_sid($sid),"Vizualizare chestionar",""); echo ""; echo "

"; $uid = getuid_sid($sid); $pollid = mysql_fetch_array(mysql_query("SELECT pollid FROM lib3rtymrc_topics WHERE id='".$who."'")); if($pollid[0]>0) { $polli = mysql_fetch_array(mysql_query("SELECT id, pqst, opt1, opt2, opt3, opt4, opt5, pdt FROM lib3rtymrc_polls WHERE id='".$pollid[0]."'")); if(trim($polli[1])!="") { $qst = parsepm($polli[1], $sid); echo $qst."

"; $vdone = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_presults WHERE uid='".$uid."' AND pid='".$pollid[0]."'")); $nov = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_presults WHERE pid='".$pollid[0]."'")); $nov = $nov[0]; if($vdone[0]>0) { $voted= TRUE; }else{ $voted = FALSE; } $opt1 = $polli[2]; if (trim($opt1)!="") { $opt1 = htmlspecialchars($opt1); $nov1 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_presults WHERE pid='".$pollid[0]."' AND ans='1'")); $nov1 = $nov1[0]; if($nov>0) { $per = floor(($nov1/$nov)*100); $rests = "Voturi: $nov1($per%)"; }else{ $rests = "Voturi: 0(0%)"; } if($voted) { $lnk = "1.$opt1 $rests
"; }else{ $lnk = "1.$opt1 $rests
"; } echo "$lnk"; } $opt2 = $polli[3]; if (trim($opt2)!="") { $opt2 = htmlspecialchars($opt2); $nov2 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_presults WHERE pid='".$pollid[0]."' AND ans='2'")); $nov2 = $nov2[0]; if($nov>0) { $per = floor(($nov2/$nov)*100); $rests = "Voturi: $nov2($per%)"; }else{ $rests = "Voturi: 0(0%)"; } if($voted) { $lnk = "2.$opt2 $rests
"; }else{ $lnk = "2.$opt2 $rests
"; } echo "$lnk"; } $opt3 = $polli[4]; if (trim($opt3)!="") { $opt3 = htmlspecialchars($opt3); $nov3 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_presults WHERE pid='".$pollid[0]."' AND ans='3'")); $nov3 = $nov3[0]; if($nov>0) { $per = floor(($nov3/$nov)*100); $rests = "Voturi: $nov3($per%)"; }else{ $rests = "Voturi: 0(0%)"; } if($voted) { $lnk = "3.$opt3 $rests
"; }else{ $lnk = "3.$opt3 $rests
"; } echo "$lnk"; } $opt4 = $polli[5]; if (trim($opt4)!="") { $opt4 = htmlspecialchars($opt4); $nov4 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_presults WHERE pid='".$pollid[0]."' AND ans='4'")); $nov4 = $nov4[0]; if($nov>0) { $per = floor(($nov4/$nov)*100); $rests = "Voturi: $nov4($per%)"; }else{ $rests = "Voturi: 0(0%)"; } if($voted) { $lnk = "4.$opt4 $rests
"; }else{ $lnk = "4.$opt4 $rests
"; } echo "$lnk"; } $opt5 = $polli[6]; if (trim($opt5)!="") { $opt5 = htmlspecialchars($opt5); $nov5 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_presults WHERE pid='".$pollid[0]."' AND ans='5'")); $nov5 = $nov5[0]; if($nov>0) { $per = floor(($nov5/$nov)*100); $rests = "Voturi: $nov5($per%)"; }else{ $rests = "Voturi: 0(0%)"; } if($voted) { $lnk = "5.$opt5 $rests
"; }else{ $lnk = "5.$opt5 $rests
"; } echo "$lnk"; } echo "".date("d m y - H:i",$polli[7]).""; }else{ echo "\"x\"/Acest user nu are chestionar"; } }else{ echo "\"x\"/Acest user nu are chestionar"; } echo "

"; echo "

"; echo "\"*\"/"; echo "Prim"; echo "

"; echo "
"; } /* /////////////////////////Main Page Here echo ""; echo "

"; echo "\"*\"/
"; //echo "welcome: guest

"; echo "Numele:

"; echo "Parola:

"; echo "autentificare"; echo ""; echo ""; echo ""; echo "

"; echo "
"; } */ ?>