Popup needed ok got it?

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

    Popup needed ok got it?

    here are the popup pages i got from another script arawap.
    the thing is that now when i add them i am getting that my buddy is not my buddy so cannot send popup is there any one who tried to fixed it? help



    here are the popus.php

    PHP Code:


    <?php
    header
    ("Content-type: text/vnd.wap.wml");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    echo(
    "<?xml version=\"1.0\"?>");
    echo 
    "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""" \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
    ?>
    <wml>
    <?php
    include("config.php");
    include(
    "core.php");
    connectdb();
    $action $_GET['action'];
    $sid $_GET['sid'];
    $page $_GET['page'];
    $who $_GET['who'];
    $pmid $_GET['pmid'];
    if(
    islogged($sid)==false)
    {
        echo 
    "<card id=\"main\" title=\"$sitename\">";
          echo 
    "<p align=\"center\">";
          echo 
    "You are not logged in<br/>";
          echo 
    "Or Your session has been expired<br/><br/>";
          echo 
    "<a href=\"index.php\">Login</a>";
          echo 
    "</p>";
          echo 
    "</card>";
          echo 
    "</wml>";
          exit();
    }
    $uid getuid_sid($sid);
    if(
    isbanned($uid))
        {
            echo 
    "<card id=\"main\" title=\"$sitename\">";
          echo 
    "<p align=\"center\">";
          echo 
    "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";
          echo 
    "You are <b>Banned</b><br/>";
          
    $banto mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'"));
          
    $remain $banto[0]- time();
          
    $rmsg gettimemsg($remain);
          echo 
    "Time to finish your penalty: $rmsg<br/><br/>";
          
    //echo "<a href=\"index.php\">Login</a>";
          
    echo "</p>";
          echo 
    "</card>";
          echo 
    "</wml>";
          exit();
        }


    else if(
    $action=="send")
    {
    addonline(getuid_sid($sid),"Sending pop-up MSG","");
    echo 
    "<card id=\"main\" title=\"sent!!\">";
    echo 
    "<p align=\"center\">";
    $whonick getnick_uid($who);
    $byuid getuid_sid($sid);
    $tm time();

    $res mysql_query("INSERT INTO fun_pops SET text='".$msg."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'");



        echo 
    "<img src=\"images/sent.gif\" alt=\"O\"/><br/>";
        echo 
    "Popup Message Sent to $whonick!<br/>";

        
    echo 
    "<br/>---<br/><a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
    echo 
    "</p>";
    echo 
    "</card>";
    echo 
    "</wml>";
    exit();

    }
    else if(
    $action=="sendto"){

    $who $_get['who'];

    addonline(getuid_sid($sid),"Sending pop-up MSG","");
    echo 
    "<card id=\"main\" title=\"popups\">";
    echo 
    "<p align=\"center\">";
    echo 
    "$getbuttons <br/>";

    $who $_get['who'];


    $whonick getnick_uid($who);
    $byuid getuid_sid($sid);

    echo 
    "<input name=\"msg\" maxlength=\"150\"/><br/>";
    echo 
    "<anchor>SEND<go href=\"popus.php?action=send&amp;who=$who&amp;sid=$sid\" method=\"post\">";
    echo 
    "<postfield name=\"msg\" value=\"$(msg)\"/>";
    echo 
    "</go></anchor><br/>";


    echo 
    "
    <br/>-
    <br/><a href=\"index.php?action=main&amp;sid=
    $sid\">Home</a>
    "
    ;
    }
    echo 
    "</p>";
    echo 
    "</card>";
    ?>
    </wml>


    and here are the popup.php


    PHP Code:


    <?php


    include("core.php");
    include(
    "config.php");


    header("Content-type: text/html; charset=ISO-8859-1");
    echo 
    "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
    echo 
    "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
    echo 
    "<html xmlns=\"http://www.w3.org/1999/xhtml\">";

        echo 
    "<head>";

        echo 
    "<title>$stitle</title>";
        echo 
    "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style.css\" />";
    echo 
    "
    <meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />
    <meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>
    <meta name=\"description\" content=\"Fun mobile :)\"> 
    <meta name=\"keywords\" content=\"free, community, forums, chat, wap, communicate\">
    "
    ;
        echo 
    "</head>";

        echo 
    "<body>";
    connectdb();
    $action $_GET["action"];
    $sid $_GET["sid"];
    $text $_POST["text"];
    $who $_POST["who"];

    if(
    islogged($sid)==false)
    {
        
          echo 
    "<p align=\"center\">";
          echo 
    "You are not logged in<br/>";
          echo 
    "Or Your session has been expired<br/><br/>";
          echo 
    "<a href=\"index.php\">Login</a>";
          echo 
    "</p>";
          
          exit();
    }

    else if(
    $action=="send")
    {
    $who=$_POST["who"];
    $msg=$_POST["msg"];

    addonline(getuid_sid($sid),"Sending pop-up MSG","");
        
        echo 
    "<p align=\"center\">";
    $whonick getnick_uid($who);
    $byuid getuid_sid($sid);
    $tm time();
    if(
    arebuds($byuid$who)==true
    {
    $res mysql_query("INSERT INTO ibwf_pops SET text='".$msg."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'");
    if(
    $res)
      {
    include(
    "pops.php");
        echo 
    "<img src=\"images/sent.gif\" alt=\"O\"/><br/>";
        echo 
    "Popup Message Sent to $whonick!<br/>";
      }else{
        echo 
    "<img src=\"images/notok.gif\" alt=\"X\"/><br/>";
        echo 
    "Can't Send Message to $whonick<br/><br/>";
      }
    }else{
        echo 
    "Name is not in buddylist!";
    }
       echo 
    "<br/>---<br/><a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
        echo 
    "</p>";
        
    }
    else if(
    $action=="archive")
    {
           
        
      }

      else{
        
    addonline(getuid_sid($sid),"Lost in inbox lol","");
        
      echo 
    "<p align=\"center\">";
      echo 
    "I don't know how did you get into here, but there's nothing to show<br/><br/>";
      echo 
    "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo 
    "Home</a>";
      echo 
    "</p>";
    }
    echo 
    "</body>";
        echo 
    "</html>";
    ?>

    and finally here pops.php


    PHP Code:

    <?php


     $uid 
    getuid_sid($sid);
     
    $nopop mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_pops WHERE touid='".$uid."' AND unread='1'"));
      if(
    $nopop[0]>0)
    {
     
    $sql ="SELECT * FROM ibwf_pops where touid='".$uid."' AND unread = '1' ORDER BY id LIMIT 0, 1";
     
    $pd mysql_query($sql);
     while (
    $pop mysql_fetch_array($pd))
      {
      
    $id mysql_fetch_array(mysql_query("SELECT touid FROM ibwf_pops WHERE touid='".$uid."'"));
      if(
    $uid==$id[0])
      {
        
    $chread mysql_query("UPDATE ibwf_pops SET unread='0' WHERE id='".$pop[0]."'");
      }
    $dtop date("d/m/y - H:i:s",$pop[5]);
    $by getnick_uid($pop[2]);
    $msg htmlspecialchars($pop[1]);
    echo 
    "<b>$by:</b> $msg - $dtop<br/>";
    echo 
    "<b>Message</b>:<br/>";
    echo 
    "<form action=\"popup.php?action=send&amp;sid=$sid\" method=\"post\">";
    echo 
    "<input type=\"text\" name=\"msg\"/><br/>";
    echo 
    "<input type=\"Submit\" value=\"reply\"/>";
    echo 
    "<input type=\"hidden\" name=\"who\" value=\"$pop[2]\"/>";

    echo 
    "</form><br/>---<br/>";
      }
    }

    lists.php

    PHP Code:

    //////////////////////////////////Buddies

    else if($action=="buds")
    {
        
    addonline(getuid_sid($sid),"Buddies List","");
        
    $pstyle gettheme($sid);
          echo 
    xhtmlhead("Buddies",$pstyle);

        
    $uid getuid_sid($sid);
        echo 
    "<p align=\"center\">";
        echo 
    "Your Buddy Message<br/>";
        echo 
    parsemsg(getbudmsg($uid), $sid);
        
        echo 
    "</p>";
        
    //////ALL LISTS SCRIPT <<

        
    if($page=="" || $page<=0)$page=1;
        
    $num_items getnbuds($uid); //changable
        
    $items_per_page5;
        
    $num_pages ceil($num_items/$items_per_page);
        if((
    $page>$num_pages)&&$page!=1)$page$num_pages;
        
    $limit_start = ($page-1)*$items_per_page;

        
    //changable sql
    /*
    $sql = "SELECT
                a.name, b.place, b.userid FROM ibwf_users a
                INNER JOIN ibwf_online b ON a.id = b.userid
                GROUP BY 1,2
                LIMIT $limit_start, $items_per_page
        ";
    */
            
    $sql "SELECT a.lastact, a.name, a.id, b.uid, b.tid, b.reqdt FROM ibwf_users a INNER JOIN ibwf_buddies b ON (a.id = b.uid) OR (a.id=b.tid) WHERE (b.uid='".$uid."' OR b.tid='".$uid."') AND b.agreed='1' GROUP BY 2,1  ORDER BY a.lastact DESC LIMIT $limit_start$items_per_page";


        echo 
    "<p>";
        
    $items mysql_query($sql);
        echo 
    mysql_error();
        if(
    mysql_num_rows($items)>0)
        {
        while (
    $item mysql_fetch_array($items))
        {
            if(
    $uid!=$item[2])
            {
              if(
    isonline($item[2]))
      {
        
    $iml "<img src=\"images/onl.gif\" alt=\"+\"/>";
        
    $uact "WHERE: ";
        
    $plc mysql_fetch_array(mysql_query("SELECT place FROM ibwf_online WHERE userid='".$item[2]."'"));
        
    $uact .= $plc[0];
      }else{
        
    $iml "<img src=\"images/ofl.gif\" alt=\"-\"/>";
        
    $uact "Last Active: ";
        
    $ladt date("d m y-H:i:s"$item[0]);
        
    $uact .= $ladt;
      }
          
    $lnk "<a href=\"index.php?action=viewuser&amp;who=$item[2]&amp;sid=$sid\">$iml$item[1]</a>";
          echo 
    "$lnk<br/>";
          echo 
    "<small>";
          
    $bs date("d m y-H:i:s",$item[5]);
          echo 
    "Buddy since:$bs<br/>";
          echo 
    "$uact<br/>";
          echo 
    "Says: ";
          
    $bmsg parsemsg(getbudmsg($item[2]), $sid);
          echo 
    "$bmsg<br/>";
      
    $lnk "<a href=\"lists.php?action=sendto&amp;who=$item[2]&amp;sid=$sid\">pOpup msg to $item[1]</a>";
    echo 
    "$lnk<br/>";
          echo 
    "</small>";
          }
        }
        }
        echo 
    "</p>";
        echo 
    "<p align=\"center\">";
        if(
    $page>1)
        {
          
    $ppage $page-1;
          echo 
    "<a href=\"lists.php?action=buds&amp;page=$ppage&amp;sid=$sid&amp;view=$view\">«Prev</a> ";
        }
        if(
    $page<$num_pages)
        {
          
    $npage $page+1;
          echo 
    "<a href=\"lists.php?action=buds&amp;page=$npage&amp;sid=$sid&amp;view=$view\">Next»</a>";
        }
        echo 
    "<br/>$page/$num_pages<br/>";
        if(
    $num_pages>2)
        {
          
    $rets "<form action=\"lists.php\" method=\"get\">";
            
    $rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/><br/>";
            
    $rets .= "<input type=\"submit\" value=\"GO\"/>";
            
    $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
            
    $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
            
            
    $rets .= "</form>";

            echo 
    $rets;
        }
        echo 
    "</p>";
      
    ////// UNTILL HERE >>
        
    echo "<p align=\"center\">";
        echo 
    "<a href=\"index.php?action=chbmsg&amp;sid=$sid\">";
    echo 
    "Buddy Message</a><br/>";
        
    $thid mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
        
    $themeimageset mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));  
        echo 
    "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
    echo 
    "Home</a>";
      echo 
    "</p>";
        echo 
    xhtmlfoot();

    and lists.php=sendto part


    PHP Code:

    else if($action=="sendto")
    {
      
    addonline(getuid_sid($sid),"Viewing buddy","index.php?action=viewbud&amp;who=$who");
        
      echo 
    "<p>";

    $sql "SELECT a.lastact, a.name, a.id, b.uid, b.tid, b.reqdt FROM ibwf_users a INNER JOIN ibwf_buddies b ON (a.id = b.uid) OR (a.id=b.tid) WHERE (b.uid='".$uid."' OR b.tid='".$uid."') AND b.agreed='1' AND a.id!='".$uid."'";

    $items mysql_query($sql);

        while (
    $item mysql_fetch_array($items))
        {
            
              if(
    isonline($item[2]))
      {
        
    $iml "<img src=\"images/onl.gif\" alt=\"+\"/>";
        
        
    $plc mysql_fetch_array(mysql_query("SELECT place FROM ibwf_online WHERE userid='".$item[2]."'"));
        
    $uact .= $plc[0];
      }else{
        
    $iml "<img src=\"images/ofl.gif\" alt=\"-\"/>";
        
    $uact "Last Active: ";
        
    $ladt date("d m y-H:i:s"$item[0]);
        
    $uact .= $ladt;
      }
    }


    $whonick getnick_uid($who);
     if(
    arebuds($uid$who)==true
    {
    echo 
    "<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$who\">$whonick</a><br/>";
    echo 
    "($uact)<br/>";
    echo 
    "pop-up message:<br/>";
    echo 
    "<form action=\"popup.php?action=send&amp;sid=$sid\" method=\"post\">";
    echo 
    "<input type=\"text\" name=\"msg\" maxlength=\"150\"/>";
    echo 
    "<input type=\"hidden\" name=\"who\" value=\"$who\"/>";
    echo 
    "<input type=\"submit\" value=\"send\"/>";

    echo 
    "</form>";

    echo 
    "<br/><a href=\"index.php?action=sendpm&amp;who=$who&amp;sid=$sid\">+ send message</a>";
    echo 
    "<br/><a href=\"genproc.php?action=bud&amp;who=$who&amp;sid=$sid&amp;todo=del\">- remove from buddylist</a>";
    }else{
    echo 
    "$whonick is not a buddy";

    }


      echo 
    "<br/>0 <a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
      echo 
    "</p>";
      




    any one can fix this popup thing then every one can use it and it will be advantage for many people! as mostly most of them were searching for popup codes the error i am getting is its telling that my buddy is not in my buddy list when i try to view my buddy list and click on send popup so if possible fix the error please.
    Nice Effects

    #2
    and what script did you try to put this code into?
    Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com

    Comment


      #3
      lavalair script
      Nice Effects

      Comment


        #4
        try replacing all ibwf_ with fun_
        Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com

        Comment

        Working...
        X