everybody have chat.php with mods?? history.. and then user come to room showing that <nick enter to room say hello> please add this script with sql.. sorry for my bad english..
chat.php FOR LAVA!
Collapse
X
-
GuestTags: None
-
Guest
-
Guest
-
PHP Code:<?php
/*
ice-chat wap
edited by Xp
*/
header("Content-type: text/vnd.wap.wml");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // expires in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Last modified, right now
header("Cache-Control: no-cache, must-revalidate"); // Prevent caching, HTTP/1.1
header("Pragma: no-cache");
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
//8152
?>
<wml>
<head>
<meta forua="true" http-equiv="Cache-Control" content="max-age=0"/>
<meta forua="true" http-equiv="Cache-Control" content="must-revalidate"/>
</head>
<?php
include("config.php");
include("core.php");
connectdb();
$action=$_GET["action"];
$id=$_GET["id"];
$sid = $_GET["sid"];
$rid=$_GET["rid"];
$vezi=$_GET["vezi"];
$rpw=$_GET["rpw"];
$who = $_GET['who'];
$uid = getuid_sid($sid);
$uexist = isuser($uid);
if((islogged($sid)==false)||!$uexist)
{
echo "<card id=\"main\" title=\"$numesite\">";
echo "<p align=\"center\">";
echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nu esti autentificat<br/>";
echo "Sau sesiunea ta a expirat<br/><br/>";
echo "<a href=\"index.php\">Autentificate</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
if(validare(getuid_sid($sid))<1)
{
echo "<card id=\"main\" title=\"Validare\">";
echo "<p align=\"center\">";
echo "<small><img src=\"images/notok.gif\" alt=\"*\"/><b>Contul tau nu a fost validat</b><br/>Este necesar sa-ti completezi corect profilul<br/>Si sa astepti validarea contului tau<br/>";
echo "Verificarea si activarea contului dumneavoastra poate dura pana la 2 de ore, va rugam asteptati.<br/>Va multumim!</small><br/><br/>";
echo "<small>";
echo "Daca nu vreti sa asteptati dati add la id-ul de messenger <b>ice_chat@ymail.com</b><br />";
echo "<br /></small>";
echo "<small>";
echo "<a href=\"index.php?action=setari&sid=$sid\">+Setari Profil</a><br/>";
echo "------<br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/> Prima Pagina</a><br/><br/>";
echo "<b>© $sitte</b><br/>";
echo "</small>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
if(isbanned($uid))
{
echo "<card id=\"main\" title=\"$numesite\">";
echo "<p align=\"center\">";
echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";
echo "Esti <b>Banat(a)</b><br/>";
$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<br/>";
$nick = getnick_uid($banto[2]);
echo "By: $nick<br/>";
echo "Motiv ban: $banres[0]";
//echo "<a href=\"index.php\">Login</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
if(ischatban($uid))
{
echo "<card id=\"main\" title=\"$numesite\">";
echo "<p align=\"center\">";
echo "<img src=\"images/notok.gif\" alt=\"x\"/>";
echo "Esti <b> Banat(a) </b> pe acest serviciu<br/>";
$banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM lib3rtymrc_penalties WHERE uid='".$uid."' AND penalty='4'"));
$remain = $banto[0]- time();
$rmsg = gettimemsg($remain);
echo "Timp ramas pana la debanare: $rmsg<br/>";
$nick = getnick_uid($banto[2]);
echo "By: $nick<br/>";
$banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM lib3rtymrc_users WHERE id='".$uid."'"));
echo "Motiv ban: $banres[0]<br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Prim</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
if(!validare($uid))
{
echo "<card id=\"main\" title=\"$numesite\">";
echo "<p align=\"center\">";
echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";
echo "Trebuie sa fii validat, ca sa poti intra aici<br/>";
echo "</p>";
echo "</card>";
echo "</wml>";
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, 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."'");
}
$isroom = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_rooms WHERE id='".$rid."'"));
if($isroom[0]==0)
{
echo "<card id=\"main\" title=\"$numesite\">";
echo "<p align=\"center\">";
echo "Aceasta camera nu mai exista<br/>";
echo ":P vezi in alta camera<br/><br/>";
echo "<a href=\"index.php?action=chat&sid=$sid\">Camere chat</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
$passworded = mysql_fetch_array(mysql_query("SELECT pass FROM lib3rtymrc_rooms WHERE id='".$rid."'"));
if($passworded[0]!="")
{
if($rpw!=$passworded[0])
{
echo "<card id=\"main\" title=\"$numesite\">";
echo "<p align=\"center\">";
echo "Nu poti intra in aceasta camera!<br/>";
echo "Parola gresita!<br/><br/>";
echo "<a href=\"index.php?action=chat&sid=$sid\">Camere chat</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
}
if(!canenter($rid,$sid))
{
echo "<card id=\"main\" title=\"$numesite\">";
echo "<p align=\"center\">";
echo "Nu poti intra in aceasta camera<br/>";
echo ":P hai ia distanta<br/><br/>";
echo "<a href=\"index.php?action=chat&sid=$sid\">Camere chat</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
$isroom = mysql_fetch_array(mysql_query("SELECT sc FROM lib3rtymrc_rooms WHERE id='".$rid."'"));
if($isroom[0]==1 && !inscris($uid))
{
echo "<card id=\"main\" title=\"$numesite\">";
echo "<p align=\"center\">";
echo "Nu esti inscris in scoala Ice-Chat.Ro<br/>";
echo "Pentru a avea acces in aceasta camera inscrie-te <a href=\"ice_scoala.php?action=meniu&sid=$sid\">aici</a>!<br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Acasa</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
if($vezi == 'icg')
{
echo "<card id=\"main\" title=\"Ice-Girl\">";
echo "<p align=\"center\">";
echo "<small><img src=\"http://ice-chat.ro/icg.jpg\" alt=\"*\"/><br/><b>Ice-Girl</b><br/><b>AsL:</b> 20-F-IceChat<br/><b>Motto:</b> Valoarea unui prieten nu o cunosti decat atunci cand il pierzi!!<br/>";
echo "O sedere placuta pe ice-chat.ro iti doresc si nu uita ca fiecare postare pe camera iti va aduce cate o moneda de gheata<br/>Va multumim!:*:*:*</small><br/><br/>";
echo "<small>";
echo "------<br/>";
if(is_numeric($rid) && $rid !== ''){
echo "<a href=\"chat.php?rid=$rid&sid=$sid\">Camera</a><br/>";
}
echo "<a href=\"index.php?action=main&sid=$sid\">Acasa</a><br/><br/>";
echo "</small>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
if($vezi == 'icb')
{
echo "<card id=\"main\" title=\"Ice-Boy\">";
echo "<p align=\"center\">";
echo "<small><img src=\"http://ice-chat.ro/icg.jpg\" alt=\"*\"/><br/><b>Ice-BoY</b><br/><b>AsL:</b> 21-B-IceChat<br/><b>Motto:</b> Fericirea este o minge de fotbal,cand este aproape o lovesti cu piciorul,cand este departe alergi dupa ea!!<br/>";
echo "O sedere placuta pe ice-chat.ro iti doresc si nu uita ca fiecare postare pe camera iti va aduce cate o moneda de gheata<br/>Va multumim!:*:*:*</small><br/><br/>";
echo "<small>";
echo "------<br/>";
if(is_numeric($rid) && $rid !== ''){
echo "<a href=\"chat.php?rid=$rid&sid=$sid\">Camera</a><br/>";
}
echo "<a href=\"index.php?action=main&sid=$sid\">Acasa</a><br/><br/>";
echo "</small>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
$pmx = pm($sid,$rid);
$timeto = 2*24*60*60;
$timenw = time();
$timeout = $timenw-$timeto;
$deleted = mysql_query("DELETE FROM lib3rtymrc_chat WHERE timesent<".$timeout."");
//////a intrat
$entercount = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_chat WHERE msgtext='!hix2ff9xpfrzplmsex112910hi2!' AND
chatter='".$uid."' AND rid='".$rid."'"));
$onlinecount = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_chonline WHERE rid='".$rid."' and uid='".$uid."'"));
if(($entercount[0]==0) && ($onlinecount[0]==0))
{
$enter = mysql_query("INSERT INTO lib3rtymrc_chat SET chatter='".$uid."', who='0', timesent='".time()."', msgtext='!hix2ff9xpfrzplmsex112910hi2!', rid='".$rid."'");
}
addtochat($uid, $rid);
////////a intrat end
if ($action==""){
$rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM lib3rtymrc_rooms WHERE id='".$rid."'"));
$rname = $rooms[1];
$nick = getnick_sid($sid);
//echo "<card id=\"chat\" title=\"".date("H:i:s")."\" ontimer=\"chat.php?time=";
echo "<card id=\"chat\" title=\"$nick@$rname\" ontimer=\"chat.php?time=";
echo date('dmHis');
echo "&sid=$sid&rid=$rid&rpw=$rpw";
echo "\">";
//start of main card
$timer = 300;
$a = false;
$DND = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM lib3rtymrc_chat WHERE chatter='".$uid."'"));
if(($DND[0]+180<time()) && !$_POST["message"]){$timer = 4000000; $a = true;}
echo "<timer value=\"$timer\"/><p align=\"center\">";
addonline($uid,"Camera Chat $rname","chat.php?sid=$sid&rid=$rid&rpw=$rpw");
$x = mysql_fetch_array(mysql_query("SELECT sc FROM lib3rtymrc_rooms WHERE id='".$rid."'"));
if($x[0]==0)
echo "<small><b>$rname</b></small><br/>";
else
echo "<small><b>Clasa de ".zi(zi_data())."</b></small><br/>";
//require_once("../radio/xp_statistica.php");
// echo "<center><small>Acum la radio: <a href=\"http://96.30.40.77:9986/listen.pls\">".htmlspecialchars($song[0])."</a></small></center>";
// alerte
$uid = getuid_sid($sid);
echo "<small>$pmx</small>";
if(ismod($uid))
{
$noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM lib3rtymrc_users WHERE validated='0' AND ignored='0'"));
if($noi[0]>0)
{
echo "<small>(!)<a href=\"moderator.php?action=validatelist&sid=$sid\">Conturi Nevalidate</a>($noi[0])</small><br/>";
}
}
//
if($a) echo "<small>Esti inactiv pe camera. Nu vei mai beneficia de auto-refresh.</small><br/>";
if(istrashed(getuid_sid($sid)))
{
echo "<small>scrie | ";
}else{
echo "<small><a href=\"chat.php?action=say&sid=$sid&rid=$rid&rpw=$rpw\">Scrie</a> | ";
}
echo "<a href=\"chat.php?time=";
echo date('dmHis');
echo "&sid=$sid&timp=".time()."&rid=$rid&rpw=$rpw";
echo "\">Refresh</a> | ";
echo "<a href=\"lists.php?action=smilies&rid=$rid&sid=$sid\">Emotii</a><br/>";
$chatters=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_chonline where rid='".$rid."'"));
// echo "<a href=\"chat.php?action=arhiva&sid=$sid&rid=$rid&rpw=$rpw\">arhiva</a> | ";
echo "<a href=\"chat.php?action=inside&sid=$sid&rid=$rid&rpw=$rpw\">".$nm."Conectati($chatters[0])</a> | ";
echo "<a href=\"lists.php?action=chmood&rid=$rid&sid=$sid\">Moduri</a><br/>";
if(isset($_GET['sterge']) && ismod($uid) && (int)$_GET['idmesaj']>0){
$xx = mysql_fetch_array(mysql_query("SELECT msgtext, chatter FROM lib3rtymrc_chat WHERE id='".$_GET['idmesaj']."'"));
mysql_query("INSERT INTO lib3rtymrc_mlog SET action='Camera', details='<b>".getnick_uid(getuid_sid($sid))."</b> a sters mesaj de pe camera: $xx[0] al lui ".getnick_uid($xx[1])." timp:".date("d-m , H:i",time())."', actdt='".time()."'");
mysql_query("DELETE FROM lib3rtymrc_chat WHERE id='".mysql_real_escape_string($_GET['idmesaj'])."'");
}
echo "</small></p>";
$message=$_POST["message"];
$who = $_POST["who"];
$ok = false;
if($who>0&&isuser($who)&&isset($_GET['p'])){
$message = "$message @[b][u]".getnick_uid($who)."[/u][/b]";
$ok = true;
}
$rinfo = mysql_fetch_array(mysql_query("SELECT censord, freaky FROM lib3rtymrc_rooms WHERE id='".$rid."'"));
if($_POST["message"]!='')
$lstidenticmsg = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM lib3rtymrc_chat WHERE msgtext='".$message."'"));
if(trim($message) != "" && $lstidenticmsg[0]+60<time()){
if($ok)$who = "";
$chatok = mysql_query("INSERT INTO lib3rtymrc_chat SET chatter='".$uid."', who='".$who."', timesent='".time()."', msgtext='".$message."', rid='".$rid."';");
$lstmsg = mysql_query("UPDATE lib3rtymrc_rooms SET lastmsg='".time()."' WHERE id='".$rid."'");
$hehe=mysql_fetch_array(mysql_query("SELECT chmsgs FROM lib3rtymrc_users WHERE id='".$uid."'"));
$totl = $hehe[0]+1;
$msgst= mysql_query("UPDATE lib3rtymrc_users SET chmsgs='".$totl."' WHERE id='".$uid."'");
//// plusuri pe camera de chat
$usts = mysql_fetch_array(mysql_query("SELECT plusses FROM lib3rtymrc_users WHERE id='".$uid."'"));
$upl = $usts[0]+1;// aici e q ++
mysql_query("UPDATE lib3rtymrc_users SET monezi=monezi+1, plusses='".$upl."' WHERE id='".$uid."'");
if($rinfo[1]==2)
{
//oh damn i gotta post this message to ravebabe :(
//will it succeed?
$botid = "a946463cae36564f";
$hostname = "www.pandorabots.com";
$hostpath = "/pandora/talk-xml";
$sendData = "botid=".$botid."&input=".urlencode($message)."&custid=".$custid;
$result = PostToHost($hostname, $hostpath, $sendData);
$pos = strpos($result, "custid=\"");
$pos = strpos($result, "<that>");
if ($pos === false) {
$reply = "";
} else {
$pos += 6;
$endpos = strpos($result, "</that>", $pos);
$reply = unhtmlspecialchars2(substr($result, $pos, $endpos - $pos));
$reply = mysql_escape_string($reply);
}
$chatok = mysql_query("INSERT INTO lib3rtymrc_chat SET chatter='8152', who='', timesent='".time()."', msgtext='".$reply." @".getnick_uid($uid)."', rid='".$rid."';");
}
}
echo "<p>";
echo "<small>";
$sqlt = time()-200;
$chats = mysql_query("SELECT chatter, who, timesent, msgtext, exposed, id FROM lib3rtymrc_chat WHERE rid='".$rid."' AND timesent>'".$sqlt."' ORDER BY timesent DESC, id DESC");
$counter=0;
if(mysql_num_rows($chats)>0)
{
while($chat = mysql_fetch_array($chats))
{
$canc = true;
if($counter<12)
{
if(istrashed($chat[0])){
if($uid!=$chat[0])
{
$canc = false;
}
}
//////good
if(isignored($chat[0],$uid)){
$canc = false;
}
//////////good
if($chat[0]!=$uid)
{
if($chat[1]!=0)
{
if($chat[1]!=$uid)
{
$canc = false;
}
}
}
if($chat[4]=='1' && ismod($uid))
{
$canc = true;
}
if($canc)
{
$cmid = mysql_fetch_array(mysql_query("SELECT chmood FROM lib3rtymrc_users WHERE id='".$chat[0]."'"));
$iml = "";
if(($cmid[0]!=0))
{
$mlnk = mysql_fetch_array(mysql_query("SELECT img, text FROM lib3rtymrc_moods WHERE id='".$cmid[0]."'"));
$iml = "";
}
$chnick = getnick_uid($chat[0]);// nick
// simbol
$sim = getsimbol($chat[0]);
//
$optlink = $iml.$sim.$chnick;
if(($chat[1]!=0)&&($chat[0]==$uid))
{
///out
$iml = "<img src=\"moods/out.gif\" alt=\"!\"/>";
$chnick = getnick_uid($chat[1]);
// simbol
$sim = getsimbol($chat[1]);
//
$optlink = $iml."PV la ".$sim.$chnick;
}
if($chat[1]==$uid)
{
///out
$iml = "<img src=\"moods/in.gif\" alt=\"!\"/>";
$chnick = getnick_uid($chat[0]);
// simbol
$sim = getsimbol($chat[0]);
//
$optlink = $iml."PV de la ".$sim.$chnick;
}
if($chat[4]=='1')
{
///out
$iml = "<img src=\"moods/point.gif\" alt=\"!\"/>";
$chnick = getnick_uid($chat[0]);
$tonick = getnick_uid($chat[1]);
$tosim = getsimbol($chat[1]);
$sim = getsimbol($chat[0]);
$optlink = "$iml de la ".$sim.$chnick." la ".$tosim.$tonick;
}
$ds= date("H:i:s", $chat[2] + $TimeZone * 60 * 60);
$text = parsepm($chat[3], $sid);
$nos = substr_count($text,"<img src=");
$nox = substr_count(curata_spam($text),"crazychat");
if(ischspam($text)||$nox>0)
{
$idmew = getuid_sid($sid);
if($chat[0]== $idmew){
$chnick = getnick_uid($chat[0]);
$sim = getsimbol($chat[0]);
echo "<a href=\"chat.php?vezi=icg&rid=$rid&sid=$sid\">IcE-GiRL</a>: ".nume_id($chat[0],$sid)." cuvantul tau nu a trecut de filtre! Echipa a fost instiintata de asta!<br/>";
echo "-----<br/>";
}else if(ismod($uid)){
$chnick = getnick_uid($chat[0]);
$sim = getsimbol($chat[0]);
echo "(!)<a href=\"profil.php?sid=$sid&who=$chat[0]&timp=".time()."\">$chnick</a> - <b>$text</b><br/>";
}
}
else if($chat[3]=="!hix2ff9xpfrzplmsex112910hi2!")
{
if(sex($gen[0])){
$sx = "<a href=\"chat.php?vezi=icg&rid=$rid&sid=$sid\">IcE-GiRL</a>";
}else{
$sx = "<a href=\"chat.php?vezi=icb&rid=$rid&sid=$sid\">IcE-BoY</a>";
}
$chnick = getnick_uid($chat[0]);
echo "<i>*$sx - ".nume_id($chat[0],$sid)." a intrat pe camera<img src=\"http://ice-chat.ro/images/bell.gif\" alt=\".\"/>*</i><br/>-----<br/>";
}
else if($nos>2){
$chnick = getnick_uid($chat[0]);
$sim = getsimbol($chat[0]);
echo "<a href=\"chat.php?vezi=icg&rid=$rid&sid=$sid\">IcE-GiRL</a>: <a href=\"profil.php?sid=$sid&who=$chat[0]&timp=".time()."\">$chnick</a> , este permisa folosirea a doua emotii!<br/>-----<br/>";
}else{
$sresx = substr($chat[3],0,6);
$sres = substr($chat[3],0,3);
if(ismod($chat[0])&& $sresx == "/quizz"){
$chco = strlen($chat[3]);
$goto = $chco - 6;
$rest = substr($chat[3],6,$goto);
$tosay = parsepm($rest, $sid);
echo "<b><i>*Quizz Master: $tosay*</i></b><br/>----<br/>";
}
else
if(ismod($chat[0])&& $sres == "/bb"){
// {
$chco = strlen($chat[3]);
$goto = $chco - 3;
$rest = substr($chat[3],3,$goto);
$tosay = parsepm($rest, $sid);
echo "<b><i>*Moderator camera: $tosay*</i></b><br/>----<br/>";
}else{
$tosay = parsepm($chat[3], $sid);
if($rinfo[0]==1)
{
$tosay = str_replace("****","f**k",$tosay);
$tosay = str_replace("****","sh*t",$tosay);
$tosay = str_replace("dick","d**k",$tosay);
$tosay = str_replace("pussy","pu**y",$tosay);
$tosay = str_replace("cock","c**k",$tosay);
$tosay = str_replace("pula","nu am minte, iarta-ma Doamne",$tosay);
$tosay = str_replace("pizda","afara ninge, cerul e senin",$tosay);
$tosay = str_replace("fut","imi pare rau, dar nu am cei 7 ani de acasa ",$tosay);
$tosay = str_replace("coaie","oare de ce nu inteleg eu ca aici e un chat decent?",$tosay);
$tosay = str_replace("kkt ","vreau inghetata",$tosay);
$tosay = str_replace("cacat","vreau hamburgher de la McDonalds",$tosay);
}
if($rinfo[1]==1)
{
$tosay = htmlspecialchars($chat[3]);
$tosay = strrev($tosay);
}
$nopl = mysql_fetch_array(mysql_query("SELECT sex FROM lib3rtymrc_users WHERE id='".$chat[0]."'"));
if($nopl[0]=='M')
{
$usex = "B";
}else if($nopl[0]=='F'){
$usex = "F";
}else{
$usex = "<img src=\"images/unknown.gif\" alt=\".\"/>";
}
// echo "»<a href=\"chat.php?action=say2&sid=$sid&who=$chat[0]&rid=$rid&rpw=$rpw\">$optlink</a>-$ds<br/>";
if(ismod(getuid_sid($sid)))
{
echo "<a href=\"moderator.php?action=moderare&who=$chat[0]&sid=$sid&who=$chat[0]\">[x]</a>";
}
// echo "$usex»<a href=\"chat.php?action=say2&sid=$sid&who=$chat[0]&rid=$rid&rpw=$rpw\">$optlink</a>-".getstatus($chat[0])."<br/>";
if($chat[0]!==$uid)
echo "$usex»<a href=\"chat.php?action=privat&sid=$sid&who=$chat[0]&rid=$rid&rpw=$rpw\">$optlink</a>-$ds ".(!ismod($uid)?"":"<a href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw&idmesaj=$chat[5]&sterge\">(x)</a>")."<br/>";
else
echo "<b>$optlink-$ds</b> ".(!ismod($uid)?"":"<a href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw&idmesaj=$chat[5]&sterge\">(x)</a>")."<br/>";
echo $tosay."<br/>-----<br/>";
}
/////////
}
$counter++;
}
}
}}else{ echo "Camera nu contine mesaje<br/>";}
echo "</small>";
echo "</p>";
echo "<p align=\"center\">";
echo "<small><a href=\"index.php?action=chat&sid=$sid\">Meniu Chat</a></small><br/>";
echo "<small><a href=\"index.php?action=main&sid=$sid\">Acasa</a></small><br/>";
echo "</p>";
echo "</card>";
}
/////////////////////////////////////////////////////SAY
else if ($action=="say") {
addonline($uid,"Scrie mesaj pe chat","");
echo "<card id=\"say\" title=\"Scrie Mesaj pe Chat\">";
echo "<onevent type=\"onenterforward\">";
echo "<refresh><setvar name=\"message\" value=\"\"/>";
echo "</refresh></onevent>";
echo "<p align=\"center\">";
echo "<small>";
echo "Scrie mesaj pe chat<br/><br/>";
echo "</small>";
echo "<small>Mesaj:</small><br/><input name=\"message$r\" type=\"text\" value=\"\" maxlength=\"255\"/><br/>";
if(istrashed(getuid_sid($sid)))
{
echo "<small>Scrie</small><br/><br/>";
}else{
echo "<anchor><small>Scrie</small>";
echo "<go href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw&r=$r\" method=\"post\">";
echo "<postfield name=\"message\" value=\"$(message$r)\"/>";
echo "</go></anchor><br/><br/>";
}
echo "<small>";
echo "<a href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\">Inapoi pe camera</a><br/>";
echo "<a href=\"chat.php?action=inside&sid=$sid&rid=$rid&rpw=$rpw\">Conectati camera</a><br/>";
echo "<a href=\"index.php?action=chat&sid=$sid\">Meniu chat</a><br/><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Acasa</a>";
echo "</small>";
echo "</p></card>";
}
/////////////////////////////////////////////////////SAY2
else if ($action=="privat") {
$unick = getnick_uid($who);
$sim = getsimbol($who);
addonline($uid,"Scrie mesaj privat pe Chat","");
echo "<card id=\"say\" title=\"Scrie mesaj privat pe Chat la $unick\">";
echo "<p align=\"center\">";
$nopl = mysql_fetch_array(mysql_query("SELECT sex, location, birthday FROM lib3rtymrc_users WHERE id='".$who."'"));
$uage = getage($nopl[2]);
if($nopl[0]=='M')
{
$usex = "<img src=\"images/male2.gif\" alt=\".\"/>";
}else if($nopl[0]=='F'){
$usex = "<img src=\"images/female2.gif\" alt=\".\"/>";
}else{
$usex = "<img src=\"images/unknown.gif\" alt=\".\"/>";
}
echo "<b>Privat la $sim$unick</b>";
echo "<br/>";
echo "<small>$usex/$uage ani/$nopl[1]</small>";
echo "</p>";
print '<onevent type="onenterforward">';
print '<refresh>';
print '<setvar name="message" value=""/>';
print '</refresh>';
print '</onevent>';
echo "<p align=\"center\">";
echo "<small>Mesaj:</small><br/> <input name=\"message\" type=\"text\" value=\" \" maxlength=\"255\"/><br/>";
echo "<small><anchor>Trimite privat";
echo "<go href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\" method=\"post\">";
echo "<postfield name=\"message\" value=\"$(message)\"/>";
echo "<postfield name=\"who\" value=\"$who\"/>";
echo "</go></anchor></small><br/>";
echo "<small><anchor>Trimite public";
echo "<go href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw&p\" method=\"post\">";
echo "<postfield name=\"message\" value=\"$(message)\"/>";
echo "<postfield name=\"who\" value=\"$who\"/>";
echo "</go></anchor></small><br/><br/>";
echo "<small><a href=\"index.php?action=viewuser&sid=$sid&who=$who\">Profilul lui $unick</a></small><br/>";
echo "<small><a href=\"chat.php?action=expose&sid=$sid&who=$who&rid=$rid&rpw=$rpw\">Expune $unick</a></small><br/>";
echo "<small><a href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\">Inapoi pe camera</a></small>";
//end
echo "<small><br/>-----<br/><a href=\"index.php?action=chat&sid=$sid\">Camere</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Acasa</a></small></p>";
echo "</card>";
}
else if ($action=="arhiva") {
$rid= $_GET["rid"];
$cum= $_GET["cum"];
$rooms = mysql_fetch_array(mysql_query("SELECT name FROM lib3rtymrc_rooms WHERE id='".$rid."'"));
$rname = $rooms[0];
if(isset($_GET['private'])){
$alecui = $uid;
}
if(isset($_GET['String'])&& isuser(getuid_nick($_GET['String']))){
$chatter = getuid_nick($_GET['String']);
$ok = true;
}
echo "<card id=\"say\" title=\"Vizualizeaza arhiva $rname\">";
addonline($uid,"Vizualizeaza arhiva $rname","");
echo "<p align=\"center\"><small>";
if(isset($_GET['private'])){
echo "Mesajele private primite de mine pe<br/><b>$rname</b><br/>";
echo "<a href=\"chat.php?action=arhiva&sid=$sid&rid=$rid&rpw=$rpw\">arata toata arhiva</a>";
}else{
echo "Arhiva mesajelor de pe camera de chat<br/><b>$rname</b><br/>";
echo "<a href=\"chat.php?action=arhiva&private&sid=$sid&rid=$rid&rpw=$rpw\">arata-mi privatele</a>";
echo "<br/>Afiseaza postarile lui<br/> <input name=\"string\" maxlength=\"20\"/><br/>";
echo "<anchor>Bine";
echo "<go href=\"chat.php?\" method=\"get\">
<postfield name=\"action\" value=\"arhiva\"/>
<postfield name=\"sid\" value=\"$sid\"/>
<postfield name=\"rid\" value=\"$rid\"/>
<postfield name=\"rpw\" value=\"$rpw\"/>
<postfield name=\"String\" value=\"$(string)\"/>
</go>
</anchor>";
}
echo "</small></p>";
echo "<p align=\"left\">";
/////////////// faza q pagina
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_chat WHERE rid='".$rid."' ".(isset($_GET['private'])?"AND who='".$alecui."'":"")."".($ok?"AND chatter='".$chatter."' AND who='0'":"").""));
$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 chatter, who, timesent, msgtext, exposed FROM lib3rtymrc_chat WHERE rid='".$rid."' ".(isset($_GET['private'])?"AND who='".$alecui."'":"")."".($ok?"AND chatter='".$chatter."' AND who='0'":"")." ORDER BY timesent DESC LIMIT $limit_start, $items_per_page";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$who = $item[0];
$sim = getsimbol($item[0]);
$text = $item[3] ;
$ds= date("d-m-y, H:i:s", $item[2]);
$nick = getnick_uid($item[0]);
$link = "<a href=\"profil.php?who=$who&sid=$sid\">$nick</a>";
if($item[1]=="0"||($item[1]>"0"&&isset($_GET['private'])))
{
$nos = substr_count($item[3],"<img src=");
$nox = substr_count(curata_spam($text),"crazychat");
if($nos>2){
$textx = "<b>Acest mesaj contine mai mult de doua emotii</b>";
}else if(ischspam($text)||$nox>0){
$textx = "<b>Acest mesaj contine cuvinte neregulamentare</b>";
}else if(($nos<=2) AND (!ischspam($text))){
$textx = $text;
}
$textx2 = str_replace("!hix2ff9xpfrzplmsex112910hi2!","<b>A primit mesaj intampinare!</b>",$text);
$text3 = parsepm($textx2, $sid);
$mesaj = "<small>$link: $textx2<br/>$ds<br/></small>";
}else{
$mesaj = "<small>$link: <b>mesaj privat</b><br/>$ds<br/></small>";
}
echo "$mesaj";
}
//
//
//}
echo "<br/>";
echo "</p>";
echo "<p align=\"center\">";
// * partea a 2-a cu paginile * \\
if($page>1)
{
$ppage = $page-1;
echo "<small>«<a href=\"chat.php?action=$action&page=$ppage&sid=$sid&rid=$rid".($ok?"&String={$_GET['String']}":"")."".(isset($_GET['privat'])?"&privat":"")."\">inapoi</a></small><br/>";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<small><a href=\"chat.php?action=$action&page=$npage&sid=$sid&rid=$rid".($ok?"&String={$_GET['String']}":"")."".(isset($_GET['privat'])?"&privat":"")."\">inainte</a>»</small>";
}
if($num_pages>1){
echo "<br/><small>Pagina <b>$page</b> din <b>$num_pages</b></small><br/>";
}
if($num_pages>2)
{
$rets = "<small>pagina:</small><br/><input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<small><anchor>[Du-te]";
$rets .= "<go href=\"chat.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "<postfield name=\"rid\" value=\"$rid\"/>";
if(isset($_GET['String'])) $rets .= "<postfield name=\"String\" value=\"{$_GET['String']}\"/>";
if(isset($_GET['private'])) $rets .= "<postfield name=\"privat\" value=\"k\"/>";
$rets .= "</go></anchor></small>";
echo $rets;
}
// * pana aici * \\
}else{
echo "<center><small>Nu sunt mesaje arhivate pe <b>$rname</b></small></center><br/>";
}
echo "</p>";
echo "<p align=\"center\">";
echo "<small><a href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\">Inapoi pe camera</a></small>";
echo "<br/>";
echo "<small><a href=\"index.php?action=chat&sid=$sid\">Meniu Chat</a></small><br/>";
echo "<small><a href=\"index.php?action=main&sid=$sid\">Acasa</a></small></p>";
echo "</card>";
}
else if ($action=="inside") {
addonline($uid,"Conectati Camera Chat","");
echo "<card id=\"main\" title=\"Conectati chat\">";
echo "<p align=\"center\"><small>";
echo "Lista Conectati Camera<br/><br/>";
echo "</small></p>";
echo "<p align=\"left\"><small>";
$inside=mysql_query("SELECT DISTINCT * FROM lib3rtymrc_chonline WHERE rid='".$rid."' and uid IS NOT NULL");
$x = mysql_fetch_array(mysql_query("SELECT sc FROM lib3rtymrc_rooms WHERE id='".$rid."'"));
while($ins=mysql_fetch_array($inside))
{
$nopl = mysql_fetch_array(mysql_query("SELECT sex, location, birthday FROM lib3rtymrc_users WHERE id='".$ins[1]."'"));
$uage = getage($nopl[2]);
$usts = mysql_fetch_array(mysql_query("SELECT plusses FROM lib3rtymrc_users WHERE id='".$uid."'"));
if($nopl[0]=='M')
{
$usex = "<img src=\"images/male.gif\" alt=\".\"/>";
}else if($nopl[0]=='F'){
$usex = "<img src=\"images/female.gif\" alt=\".\"/>";
}else{
$usex = "<img src=\"images/unknown.gif\" alt=\".\"/>";
}
$unick = getnick_uid($ins[1]);
$sim = getsimbol($ins[1]);
$userl = "$usex<a href=\"chat.php?action=privat&sid=$sid&who=$ins[1]&rid=$rid&rpw=$rpw\">
$unick</a> - ".($x[0]==1?"".tip_fct($ins[1])."":"".camera_rang($ins[1])."")."<br/>";
echo "$userl";
}
echo "</small></p>";
echo "<p align=\"center\"><small>";
echo "<small><small>-----------</small></small><br/>";
echo "<a href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\">Inapoi pe camera</a><br/>";
echo "<a href=\"index.php?action=chat&sid=$sid\">Meniu chat</a><br/><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Acasa</a></small></p>";
echo "</card>";
}
else if ($action=="expose") {
$unick = getnick_uid($who);
addonline($uid,"Expune PV","");
echo "<card id=\"main\" title=\"Expune pv de la $unick\">";
echo "<p align=\"center\"><br/>";
mysql_query("UPDATE lib3rtymrc_chat SET exposed='1' WHERE chatter='".$who."' AND who='".$uid."'");
echo "Privatele userului $unick sunt expuse moderatorilor";
echo "<br/><br/>";
$rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM lib3rtymrc_rooms WHERE id='".$rid."'"));
$rname = $rooms[1];
echo "«<a href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\">Inapoi pe $rname</a><br/>";
// echo "<br/><a href=\"index.php?action=chat&sid=$sid\"><img src=\"images/chat.gif\" alt=\"*\"/>Meniu chat</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Prim</a></p>";
echo "</card>";
}
?>
</wml>
PHP Code:function camera_rang($uid)
{
$info= mysql_fetch_array(mysql_query("SELECT chmsgs, sex FROM lib3rtymrc_users WHERE id='".$uid."'"));
if(isbanned($uid))
{
if($info[1]=="F")$sex = "a"; else $sex = "";
return "Banat$sex!";
}
if($info[0]<100)
{
if($info[1]=="F")$sex = "a"; else $sex = "";
return "Retras$sex";
}else if($info[0]<600)
{
if($info[1]=="F")$sex = "oasa"; else $sex = "os";
return "Morocan$sex";
}else if($info[0]<800)
{
if($info[1]=="F")$sex = "a"; else $sex = "";
return "Dezghetat$sex";
}else if($info[0]<950)
{
if($info[1]=="F")$sex = "a"; else $sex = "";
return "Cunoscut$sex";
}else if($info[0]<1500)
{
if($info[1]=="F")$sex = "a"; else $sex = "";
return "Popular$a";
}else if($info[0]<3000)
{
if($info[1]=="F")$sex = "eata"; else $sex = "et";
return "Vorbar$sex";
}else
{
return "Vedeta";
}
}
<?php unlink('World/Europe/Romania.country'); ?>
Comment
-
lib3rtymrc_ to ibwf
monezi to plusses
on
if(sex($gen[0])){
$sx = "<a href=\"chat.php?vezi=icg&rid=$rid&sid=$sid \">IcE-GiRL</a>";
}else{
$sx = "<a href=\"chat.php?vezi=icb&rid=$rid&sid=$sid \">IcE-BoY</a>";
}
u can make a single line with bot .... or in condition make comparation with user sex ....and thats all ...i think<?php unlink('World/Europe/Romania.country'); ?>
Comment
Comment