Popups For Lavascript That Work Well Here It Is

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    SQL
    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`
    -- 
    On core.php
    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&amp;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&amp;sid=$sid;&amp;who=$pminfo[2]&amp;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&amp;sid=$sid;&amp;pmid=$pminfo[0]\">Skip Msg</a> ";
                 
    $popmsgbox .= "<a href=\"inbxproc.php?action=rptpop&amp;sid=$sid;&amp;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];
    } 
    on main menu after the session expyrd or the function of ban..
    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

    Working...
    X