put this in pages where u want popups to appear
$unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE unread='1' AND touid='".$uid."'"));
$pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$uid."'"));
$unrd="(".$unreadinbox[0]."/".$pmtotl[0].")";
if ($unreadinbox[0]>0)
{
$uid = getuid_sid($sid);
echo "<p align=\"center\">";
$popsenabled=mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE id='".$uid."'"));
if($popsenabled[0]==1)
{
$pminfo = mysql_fetch_array(mysql_query("SELECT id, text, byuid, timesent,touid, reported FROM ibwf_private WHERE unread='1' AND touid='".$uid."'"));
$pmfrm = getnick_uid($pminfo[2]);
$pmurd = mysql_query("UPDATE ibwf_private SET unread='0' WHERE id='".$pminfo[0]."'");
echo "POP-UP Message From $pmfrm";
echo "
";
$tmstamp = $pminfo[3];
$tmdt = date("d m Y - H:i:s", $tmstamp);
$pmtext = parsepm($pminfo[1], $sid);
$pmtext = str_replace("/llfaqs","<a href=\"lists.php?action=faqs&sid=$sid\">$siten ame F.A.Qs</a>", $pmtext);
$pmtext = str_replace("/reader",getnick_uid($pminfo[4]), $pmtext);
$pmid=$pminfo[0];
echo "Msg:
$pmtext
";
echo "Send Reply to $pmfrm
";
echo "<input name=\"pmtext\" maxlength=\"500\"/>
";
echo "<anchor>SEND<go href=\"inbxproc.php?action=sendpm2&who=$pminfo[2]&sid=$sid&pmid=$pminfo[0]\" method=\"post\">";
echo "<postfield name=\"pmtext\" value=\"$(pmtext)\"/>";
echo "</go></anchor>
";
$popmsgs = mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE id='".$uid."'"));
if($popmsgs[0]==1){
echo "<a href=\"index.php?action=popdisable&sid=$sid\"> Disable PopUps</a>
";
}
// $res = mysql_query("INSERT INTO ibwf_online SET userid='".$uid."', actvtime='".$tm."', place='".$place."', placedet='".$plclink."'");
$location = mysql_fetch_array(mysql_query("SELECT placedet FROM ibwf_online WHERE userid='".$uid."'"));
$loca = $location[0];
}else{
echo "
<a href=\"inbox.php?action=main&sid=$sid\">»Inbox $unrd</a>";
}
echo "</p>";
}
add ths next bit into inboxproc.php
else if($action=="sendpm2")
{
echo "<card id=\"main\" title=\"Inbox\">";
echo "<p align=\"center\">";
$pmid = $_GET["pmid"];
$whonick = getnick_uid($who);
$byuid = getuid_sid($sid);
$tm = time();
$lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'"));
$pmfl = $lastpm[0]+getpmaf();
$pmurd = mysql_query("UPDATE ibwf_private SET unread='0' WHERE id='".$pmid."'");
if($byuid==1)$pmfl=0;
if($pmfl<$tm)
{
if(!isblocked($pmtext,$byuid))
{
if((!isignored($byuid, $who))&&(!istrashed($byuid)))
{
$res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'");
}else{
$res = true;
}
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>";
echo "PM was sent successfully to $whonick
";
echo parsepm($pmtext, $sid);
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>";
echo "Can't Send PM to $whonick
";
}
}else{
$bantime = time() + (30*24*60*60);
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>";
echo "Can't Send PM to $whonick
";
echo "You just sent a link to one of the crapiest sites on earth
The members of these sites spam here a lot, so go to that site and stay there if you don't like it here
as a result of your stupid action:
1. you have lost your sheild
2. you have lost all your plusses
3. You are BANNED!";
$user = getnick_sid($sid);
mysql_query("INSERT INTO ibwf_mlog SET action='autoban', details='Wap Desire auto banned $user for spamming inbox', actdt='".time()."'");
mysql_query("INSERT INTO ibwf_penalties SET uid='".$byuid."', penalty='1', exid='1', timeto='".$bantime."', pnreas='Banned: Automatic Ban for spamming for a crap site'");
mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".$byuid."'");
mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='1', timesent='".$tm."'");
}
}else{
$rema = $pmfl - $tm;
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>";
echo "Flood control: $rema Seconds
";
}
$uid = getuid_sid($sid);
$location = mysql_fetch_array(mysql_query("SELECT placedet FROM ibwf_online WHERE userid='".$uid."'"));
$loca = $location[0];
echo "
<a href=\"$loca&sid=$sid\">Ok!</a>";
if($lastloc=="cht"){
$popmsgs = mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE id='".$uid."'"));
if($popmsgs[0]==0){
echo "
<a href=\"index.php?action=popenable&sid=$sid\">E nable Pop-Ups</a>
";
}else{
echo "
<a href=\"index.php?action=popdisable&sid=$sid\"> Disable Pop-Ups</a>
";
}
echo "
<a href=\"chat.php?sid=$sid&rid=$rid\">Back To $rname</a>
";
echo "
<a href=\"inbox.php?action=main&sid=$sid\">Inbox</a>
";
echo "<a href=\"lists.php?action=buds&sid=$sid\">BuddyL ist</a>
";
echo "<a href=\"index.php?action=chat&sid=$sid\">Chat</a>
";
$fcats = mysql_query("SELECT id, name FROM ibwf_fcats ORDER BY position, id");
while($fcat=mysql_fetch_array($fcats))
{
$catlink = "<a href=\"index.php?action=viewcat&sid=$sid&c id=$fcat[0]\">$fcat[1]</a>";
echo "$catlink
";
}
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}else{
$popmsgs = mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE id='".$uid."'"));
if($popmsgs[0]==0){
echo "
<a href=\"index.php?action=popenable&sid=$sid\">E nable Pop-Ups</a>
";
}else{
echo "
<a href=\"index.php?action=popdisable&sid=$sid\"> Disable Pop-Ups</a>
";
} echo "
<a href=\"inbox.php?action=main&sid=$sid\">Inbox</a>
";
echo "<a href=\"lists.php?action=buds&sid=$sid\">BuddyL ist</a>
";
echo "<a href=\"index.php?action=chat&sid=$sid\">Chat</a>
";
$fcats = mysql_query("SELECT id, name FROM ibwf_fcats ORDER BY position, id");
while($fcat=mysql_fetch_array($fcats))
{
$catlink = "<a href=\"index.php?action=viewcat&sid=$sid&c id=$fcat[0]\">$fcat[1]</a>";
echo "$catlink
";
}
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
}
now on each page wif popup u hav to add the pages link into the addonline function like this
addonline(getuid_sid($sid),"Main Menu","index.php?action=$action");
other wise when u type ur popup reply the next page wont let u bak to where u were u would get 404 not found
enjoy any questions feel free 2 ask me
$unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE unread='1' AND touid='".$uid."'"));
$pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$uid."'"));
$unrd="(".$unreadinbox[0]."/".$pmtotl[0].")";
if ($unreadinbox[0]>0)
{
$uid = getuid_sid($sid);
echo "<p align=\"center\">";
$popsenabled=mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE id='".$uid."'"));
if($popsenabled[0]==1)
{
$pminfo = mysql_fetch_array(mysql_query("SELECT id, text, byuid, timesent,touid, reported FROM ibwf_private WHERE unread='1' AND touid='".$uid."'"));
$pmfrm = getnick_uid($pminfo[2]);
$pmurd = mysql_query("UPDATE ibwf_private SET unread='0' WHERE id='".$pminfo[0]."'");
echo "POP-UP Message From $pmfrm";
echo "
";
$tmstamp = $pminfo[3];
$tmdt = date("d m Y - H:i:s", $tmstamp);
$pmtext = parsepm($pminfo[1], $sid);
$pmtext = str_replace("/llfaqs","<a href=\"lists.php?action=faqs&sid=$sid\">$siten ame F.A.Qs</a>", $pmtext);
$pmtext = str_replace("/reader",getnick_uid($pminfo[4]), $pmtext);
$pmid=$pminfo[0];
echo "Msg:
$pmtext
";
echo "Send Reply to $pmfrm
";
echo "<input name=\"pmtext\" maxlength=\"500\"/>
";
echo "<anchor>SEND<go href=\"inbxproc.php?action=sendpm2&who=$pminfo[2]&sid=$sid&pmid=$pminfo[0]\" method=\"post\">";
echo "<postfield name=\"pmtext\" value=\"$(pmtext)\"/>";
echo "</go></anchor>
";
$popmsgs = mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE id='".$uid."'"));
if($popmsgs[0]==1){
echo "<a href=\"index.php?action=popdisable&sid=$sid\"> Disable PopUps</a>
";
}
// $res = mysql_query("INSERT INTO ibwf_online SET userid='".$uid."', actvtime='".$tm."', place='".$place."', placedet='".$plclink."'");
$location = mysql_fetch_array(mysql_query("SELECT placedet FROM ibwf_online WHERE userid='".$uid."'"));
$loca = $location[0];
}else{
echo "
<a href=\"inbox.php?action=main&sid=$sid\">»Inbox $unrd</a>";
}
echo "</p>";
}
add ths next bit into inboxproc.php
else if($action=="sendpm2")
{
echo "<card id=\"main\" title=\"Inbox\">";
echo "<p align=\"center\">";
$pmid = $_GET["pmid"];
$whonick = getnick_uid($who);
$byuid = getuid_sid($sid);
$tm = time();
$lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'"));
$pmfl = $lastpm[0]+getpmaf();
$pmurd = mysql_query("UPDATE ibwf_private SET unread='0' WHERE id='".$pmid."'");
if($byuid==1)$pmfl=0;
if($pmfl<$tm)
{
if(!isblocked($pmtext,$byuid))
{
if((!isignored($byuid, $who))&&(!istrashed($byuid)))
{
$res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'");
}else{
$res = true;
}
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>";
echo "PM was sent successfully to $whonick
";
echo parsepm($pmtext, $sid);
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>";
echo "Can't Send PM to $whonick
";
}
}else{
$bantime = time() + (30*24*60*60);
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>";
echo "Can't Send PM to $whonick
";
echo "You just sent a link to one of the crapiest sites on earth
The members of these sites spam here a lot, so go to that site and stay there if you don't like it here
as a result of your stupid action:
1. you have lost your sheild
2. you have lost all your plusses
3. You are BANNED!";
$user = getnick_sid($sid);
mysql_query("INSERT INTO ibwf_mlog SET action='autoban', details='Wap Desire auto banned $user for spamming inbox', actdt='".time()."'");
mysql_query("INSERT INTO ibwf_penalties SET uid='".$byuid."', penalty='1', exid='1', timeto='".$bantime."', pnreas='Banned: Automatic Ban for spamming for a crap site'");
mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".$byuid."'");
mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='1', timesent='".$tm."'");
}
}else{
$rema = $pmfl - $tm;
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>";
echo "Flood control: $rema Seconds
";
}
$uid = getuid_sid($sid);
$location = mysql_fetch_array(mysql_query("SELECT placedet FROM ibwf_online WHERE userid='".$uid."'"));
$loca = $location[0];
echo "
<a href=\"$loca&sid=$sid\">Ok!</a>";
if($lastloc=="cht"){
$popmsgs = mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE id='".$uid."'"));
if($popmsgs[0]==0){
echo "
<a href=\"index.php?action=popenable&sid=$sid\">E nable Pop-Ups</a>
";
}else{
echo "
<a href=\"index.php?action=popdisable&sid=$sid\"> Disable Pop-Ups</a>
";
}
echo "
<a href=\"chat.php?sid=$sid&rid=$rid\">Back To $rname</a>
";
echo "
<a href=\"inbox.php?action=main&sid=$sid\">Inbox</a>
";
echo "<a href=\"lists.php?action=buds&sid=$sid\">BuddyL ist</a>
";
echo "<a href=\"index.php?action=chat&sid=$sid\">Chat</a>
";
$fcats = mysql_query("SELECT id, name FROM ibwf_fcats ORDER BY position, id");
while($fcat=mysql_fetch_array($fcats))
{
$catlink = "<a href=\"index.php?action=viewcat&sid=$sid&c id=$fcat[0]\">$fcat[1]</a>";
echo "$catlink
";
}
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}else{
$popmsgs = mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE id='".$uid."'"));
if($popmsgs[0]==0){
echo "
<a href=\"index.php?action=popenable&sid=$sid\">E nable Pop-Ups</a>
";
}else{
echo "
<a href=\"index.php?action=popdisable&sid=$sid\"> Disable Pop-Ups</a>
";
} echo "
<a href=\"inbox.php?action=main&sid=$sid\">Inbox</a>
";
echo "<a href=\"lists.php?action=buds&sid=$sid\">BuddyL ist</a>
";
echo "<a href=\"index.php?action=chat&sid=$sid\">Chat</a>
";
$fcats = mysql_query("SELECT id, name FROM ibwf_fcats ORDER BY position, id");
while($fcat=mysql_fetch_array($fcats))
{
$catlink = "<a href=\"index.php?action=viewcat&sid=$sid&c id=$fcat[0]\">$fcat[1]</a>";
echo "$catlink
";
}
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
}
now on each page wif popup u hav to add the pages link into the addonline function like this
addonline(getuid_sid($sid),"Main Menu","index.php?action=$action");
other wise when u type ur popup reply the next page wont let u bak to where u were u would get 404 not found
enjoy any questions feel free 2 ask me
Comment