SQL
On core.php
on main menu after the session expyrd or the function of ban..
PHP Code:
-- Table structure for table `minunga_popups`
--
CREATE TABLE IF NOT EXISTS `minunga_popups` (
`id` int(100) NOT NULL AUTO_INCREMENT,
`text` blob NOT NULL,
`byuid` int(100) NOT NULL DEFAULT '0',
`touid` int(100) NOT NULL DEFAULT '0',
`unread` char(1) NOT NULL DEFAULT '1',
`timesent` int(100) NOT NULL DEFAULT '0',
`reported` char(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table `minunga_popups`
--
PHP Code:
function popup($sid)
{
$uid = getuid_sid($sid);
$unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM minunga_popups WHERE unread='1' AND touid='".$uid."'"));
$popsenabled=mysql_fetch_array(mysql_query("SELECT popmsg FROM minunga_users WHERE id='".$uid."'"));
$pminfo = mysql_fetch_array(mysql_query("SELECT id, text, byuid, timesent, touid, reported FROM minunga_popups WHERE unread='1' AND touid='".$uid."'"));
$pmfrm = getnick_uid($pminfo[2]);
$avlink = getavatar($pminfo[2]);
$popmsgbox .= "<div align=\"left\"><div class=\"a\"><div class=\"avatar\"><img src=\"$avlink\" alt=\"$id\" width=\"30\" height=\"30\"/></div>From $pmfrm";
$popmsgbox .= "<br/>";
$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\">$sitename F.A.Qs</a>", $pmtext);
$pmtext = str_replace("/reader",getnick_uid($pminfo[4]), $pmtext);
$pmid=$pminfo[0];
$popmsgbox .= "<br/>Message:<br/>$pmtext";
$popmsgbox .= "<form action=\"inboxproc.php?action=sendpopup&sid=$sid;&who=$pminfo[2]&pmid=$pminfo[0]\" method=\"post\">";
$popmsgbox .= "<input name=\"pmtext\" maxlength=\"500\"/><br/>";
$popmsgbox .= "<input type=\"Submit\" name=\"submit\" Value=\"Send\"></form>";
$res = mysql_query("INSERT INTO minunga_online SET userid='".$uid."', actvtime='".$tm."', place='".$place."', placedet='".$plclink."'");
$popmsgbox .= "<center><a href=\"genproc.php?action=skippopup&sid=$sid;&pmid=$pminfo[0]\">Skip Msg</a> ";
$popmsgbox .= "<a href=\"inbxproc.php?action=rptpop&sid=$sid;&pmid=$pminfo[0]\">Report</a></div></div>";
return $popmsgbox;
}
function ispopup($uid)
{
$unreadpopup = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM minunga_popups WHERE unread='1' AND touid='".$uid."'"));
return $unreadpopup[0];
}
PHP Code:
if(ispopup($uid))
{
echo "<head>";
echo "<title>Popup Message</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$style[0]\"/>";
echo "</head>";
addonline(getuid_sid($sid),"Reading Popup Msg","");
echo "<div class=\"head\"><center><font color=\"white\">Popup Menu</font></center></div>";
echo "<center>View Popup Msg</center></div><br/>";
echo popup($sid);
echo "<div class=\"footer\"><cemter><a href=\"main.php\">Home";
echo "</div>";
echo "<div class=\"lcstyle\">All Rights Reserved<br/>© Lavalair.net</div>";
echo "</body>";
echo "</html>";
exit();
}
Comment