for those who dnt wona go thru the mobizonez script
usage where u want the popup to be shown
in ur cpanel or where ppl can turn on the allerts
any place in the index
in core.php
here are the sql add in ibwf_user
i think thats all for the popup pm enjoy
usage where u want the popup to be shown
Code:
getalert($sid);
Code:
if (alertstat($sid)==0){ echo "<a href=\"index.php?action=alert&sid=$sid\">»Turn alerts on</a><br/>"; } else{ echo "<a href=\"index.php?action=alert&sid=$sid\">»Turn alerts off</a><br/>"; }
Code:
/////////////////////////////turn alerts on or off//////////////////// else if($action=="alert") { addonline($uid,"Toggling alerts","index.php?action=$action"); gettimebar(); getnewmsg($sid); getalert($sid); getshouts($sid); boxstart("Toggle Alerts"); $userwa = $uid; if(alertstat($sid)==0){ mysql_query("UPDATE ibwf_users SET alert=1 WHERE id=$userwa"); echo "<p>Alerts have been successfully activated<br/>"; } else if(alertstat($sid)==1){ mysql_query("UPDATE ibwf_users SET alert=0 WHERE id=$userwa"); echo "<p>Alerts have been successfully de-activated<br/>"; } echo "</p>"; boxend(); getfooter($sid); }
Code:
function getalert($sid){ if (alertstat($sid)==1){ $userid = getuid_sid($sid); $count = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_private WHERE touid = $userid AND unread='1'")); if($count[0]>0){ $lastmsg_id = mysql_fetch_array(mysql_query("SELECT MIN(id) FROM ibwf_private WHERE touid = $userid AND unread='1'")); $pminfo = mysql_fetch_array(mysql_query("SELECT text, timesent, byuid, reported FROM ibwf_private WHERE id = $lastmsg_id[0]")); if(isonline($pminfo[2])){ $iml = "<img src=\"images/onl.gif\" alt=\"On\"/>"; }else{ $iml = "<img src=\"images/ofl.gif\" alt=\"Off\"/>"; } $msgtxt = " <div class=\"boxed\"> <div class=\"boxedTitle\"> <h1 align=\"center\" class=\"boxedTitleText\"><b>Message Alert</b> </h1> </div> <div class=\"boxedContent\"> "; $msgtxt .= "<small><b>From</b>: $iml<a href=\"index.php?action=viewuser&who=$pminfo[2]&sid=$sid\">".getnick_uid($pminfo[2])."</a><br/>"; $tmstamp = $pminfo[1] + addhours(); $tmdt = date("d/m/Y h:i:s A", $tmstamp); $diff1=time()-$pminfo[1]; $msgtxt .= "<b>Sent</b>: $tmdt<br/>".gettimemsg($diff1)."<br/>"; $pmtext = parsepm($pminfo[0], $sid); if(isspam($pmtext)){ if(($pminfo[3]=="0") && ($pminfo[2]!=1)){ mysql_query("UPDATE ibwf_private SET reported='1' WHERE id='".$pmid."'"); } } $msgtxt .= "<b>Message</b>:<br/>".$pmtext; $msgtxt .= "<u><br/>Reply:</u>:<br/>"; $msgtxt .= "<form action=\"inbxproc.php?action=sendpm&who=$pminfo[2]&sid=$sid\" method=\"post\"><textarea id=\"inputText\" name=\"pmtext\"></textarea><br/>"; $msgtxt .= "<input id=\"inputButton\" type=\"submit\" value=\"Send\"/>"; $msgtxt .= "</form>"; $msgtxt .= "<br/><a href=\"inbox.php?action=main&sid=$sid\">Go to Inbox</a><br/></small></div></div>"; mysql_query("UPDATE ibwf_private SET unread='0' WHERE id = $lastmsg_id[0]"); echo $msgtxt; return; } else { return ""; } } else { return ""; } }function getppp($uid){ $ppp = mysql_fetch_array(mysql_query("SELECT ppp FROM ibwf_users WHERE id = $uid")); return $ppp[0]; } function alertstat($sid){ $userid=getuid_sid($sid); if(!$userid){ return 0; } $alerstat = mysql_fetch_array(mysql_query("SELECT alert FROM ibwf_users WHERE id = $userid")); return $alerstat[0]; }
Code:
`alert` int(1) NOT NULL default '0',
Comment