Refresh Page

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

    Refresh Page

    trying to get my inbox page to refresh . found it seems to be wrote into the code of the script am using . but i am getting error when i remove //

    //ontimer=\"inbox.php?action=main&sid=$sid\">";
    //echo "<timer value=\"300\"/>";
    echo "<p align=\"center\">";
    echo "1 <a accesskey=\"1\" href=\"inbox.php?action=sendto&amp;sid=$sid\">Send New Msg</a>";
    //echo "Inbox Auto Refreshes every 30 seconds

    ";


    error is the = sign on first lline . unexpected = .

    have also tried other ways ie

    echo &#39;<meta http-equiv="Refresh"
    content="10; URL=http://yoursite.example/inbox.php?action=main&amp;sid=$sid" />&#39;;

    it refreshes with that but dont keep the sid logged in. tried various functions and ways using sid $sid etc . cant seem to work it out .

    thanks in advance.
    Wapchat4u


    Topsites4u

    #2
    Code:
    <?php
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    //header(&#39;Content-type: application/vnd.wap.xhtml+xml&#39;); 
    echo "<?xml version=\"1.0\"?>";
    echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
    ?>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <?php
    include("config.php");
    include("core.php");
    connectdb();
    $action = $_GET["action"];
    $sid = $_GET["sid"];
    $page = $_GET["page"];
    $who = $_GET["who"];
    $pmid = $_GET["pmid"];
    $sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name=&#39;sitename&#39;"));
    $sitename = $sitename[0];
    $uid = getuid_sid($sid);
    $theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
    $lastloc=$_GET["lstloc"];
    
    if($lastloc=="cht"){
        $rid= $_GET["rid"];
        $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id=&#39;".$rid."&#39;"));
        $rname = $rooms[1];
    }
    
    if(islogged($sid)==false)
    {
          echo "<head>";
          echo "<title>Error!!!</title>";
          echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
          echo "</head>";
          echo "<body>";
          echo "<p align=\"center\">";
          echo "You are not logged in
    ";
          echo "Or Your session has been expired
    
    ";
          echo "<a href=\"index.php\">Login</a>";
          echo "</p>";
          echo "</body>";
          echo "</html>";
          exit();
    }
    $uid = getuid_sid($sid);
    if(isbanned($uid))
        {
          echo "<head>";
          echo "<title>Error!!!</title>";
          echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo "</head>";
          echo "<body>";
          echo "<p align=\"center\">";
          echo "<img src=\"../images/notok.gif\" alt=\"x\"/>
    ";
          echo "[b]You are Banned[/b]
    
    ";
          $banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid=&#39;".$uid."&#39; AND penalty=&#39;1&#39; OR uid=&#39;".$uid."&#39; AND penalty=&#39;2&#39;"));
        $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
          $remain = $banto[0]- time();
          $rmsg = gettimemsg($remain);
          echo "[b]Time Left: [/b]$rmsg
    ";
          $nick = getnick_uid($banto[2]);
        echo "[b]By: [/b]$nick
    ";
        echo "[b]Reason: [/b]$banto[1]";
          //echo "<a href=\"index.php\">Login</a>";
          echo "</p>";
          echo "</body>";
          echo "</html>";
          exit();
        }
    
    if($action=="sendpm")
    {
      addonline(getuid_sid($sid),"Sending Inbox","inbox.php?action=main");
          echo "<head>";
          echo "<title>Inbox</title>";
          echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo "</head>";
          echo "<body>";
      echo "<p align=\"center\">";
      $whonick = getnick_uid($who);
      echo "Send Inbox to $whonick
    
    ";
      echo "<form action=\"inbxproc.php?action=sendpm&amp;who=$who&amp;sid=$sid\" method=\"post\">";
      echo "<input name=\"pmtext\" maxlength=\"500\"/>
    ";
      echo "<input type=\"Submit\" name=\"send\" value=\"Send\"></form>";
      echo "
    
    ";
      echo "
    [b]6 [/b]<a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>
    ";
      echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a>
    ";
      echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\">Chat</a>
    ";
      echo forumlink($sid,9);
      echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p>";
        echo "</body>";
    
    }
    else if($action=="sendpopup")
    {
      addonline(getuid_sid($sid),"Sending Popup","lists.php?action=buds");
          echo "<head>";
          echo "<title>Send Popup</title>";
          echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo "</head>";
          echo "<body>";
      echo "<p align=\"center\">";
      if (!arebuds($uid, $who))
     {
        echo "$whonick is not in ur buddy list
    
    ";
        echo "[b]9 [/b]<a accesskey=\"9\" href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a>
    ";
        echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
        echo "</p></body></html>";
        exit;
      }else{
      $whonick = getnick_uid($who);
      echo "Send Popup to $whonick
    
    ";
      echo "<form action=\"inbxproc.php?action=sendpopup&amp;who=$who&amp;sid=$sid\" method=\"post\">";
      echo "<input name=\"pmtext\" maxlength=\"500\"/>
    ";
      echo "<input type=\"Submit\" name=\"send\" value=\"Send\"></form>";
      echo "[b]6 [/b]<a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>
    ";
      echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a>
    ";
      echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\">Chat</a>
    ";
      echo forumlink($sid,9);
      echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p>";
        echo "</body>";
    }
    }
    else if($action=="sendto")
    {
      addonline(getuid_sid($sid),"Sending Inbox","inbox.php?action=$action");
      echo "<head>";
      echo "<title>Send Inbox</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";
      echo "<body>";
      echo "<p align=\"center\">";
      $whonick = getnick_uid($who);
      echo "Send Inbox to:
    
    ";
      echo "<form action=\"inbxproc.php?action=sendto&amp;sid=$sid\" method=\"post\">";
      echo "User: <input name=\"who\" format=\"*x\" maxlength=\"15\"/>
    ";
      echo "Text: <input name=\"pmtext\" maxlength=\"500\"/>
    ";
      echo "<input type=\"Submit\" name=\"send\" value=\"Send\"></form>";
      echo "
    
    ";
      echo "
    [b]6 [/b]<a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>
    ";
      echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a>
    ";
      echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\">Chat</a>
    ";
      echo forumlink($sid,9);
      echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p>";
        echo "</body>";
    
    }
    else if($action=="popupto")
    {
      addonline(getuid_sid($sid),"Sending Popup","inbox.php?action=$action");
      echo "<head>";
      echo "<title>Send PPopup</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";
      echo "<body>";
      echo "<p align=\"center\">";
      $whonick = getnick_uid($who);
      echo "Send Popup To:
    ";
      echo "<form action=\"inbxproc.php?action=sendpopup&amp;sid=$sid\" method=\"post\">";
      echo "User: <input name=\"who\" format=\"*x\" maxlength=\"15\"/>
    ";
      echo "Text: <input name=\"pmtext\" maxlength=\"500\"/>
    ";
      echo "<input type=\"Submit\" name=\"send\" value=\"Send\"></form>";
      echo "[b]6 [/b]<a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>
    ";
      echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a>
    ";
      echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\">Chat</a>
    ";
      echo forumlink($sid,9);
      echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p>";
      echo "</body>";
    }
    else if($action=="popdialog")
    {
        addonline(getuid_sid($sid),"Viewing Popups","inbox.php?action=$action");
      echo "<head>";
      echo "<title>Popup Dialog</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";
      echo "<body>";
      $uid = getuid_sid($sid);
      if($page=="" || $page<=0)$page=1;
        $myid = getuid_sid($sid);
        $pms = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_popups WHERE touid=$uid ORDER BY timesent"));
        echo mysql_error();
        $num_items = $pms[0]; //changable
        $items_per_page= 10;
        $num_pages = ceil($num_items/$items_per_page);
        if($page>$num_pages)$page= $num_pages;
        $limit_start = ($page-1)*$items_per_page;
        if($num_items>0)
        {
          echo "
    
    ";
          $pms = mysql_query("SELECT byuid, text, timesent FROM ibwf_popups WHERE touid=$uid ORDER BY timesent DESC LIMIT $limit_start, $items_per_page");
          while($pm=mysql_fetch_array($pms))
          {
                if(isonline($pm[0]))
      {
        $iml = "<img src=\"../images/onl.gif\" alt=\"+\"/>";
      }else{
        $iml = "<img src=\"../images/ofl.gif\" alt=\"-\"/>";
      }
      $bylnk = "<a href=\"index.php?action=viewuser&amp;who=$pm[0]&amp;sid=$sid\">$iml".getnick_uid($pm[0])."</a>";
      echo $bylnk;
      $tmopm = date("d m y - h:i:s",$pm[2]);
      echo " [size="1"]$tmopm
    ";
      
            echo parsepm($pm[1], $sid);
    
      
      echo "[/size]";
      echo "
    --------------
    ";
          }
          echo "</p><p align=\"center\">";
          if($page>1)
        {
          $ppage = $page-1;
          echo "<a href=\"inbox.php?action=popdialog&amp;page=$ppage&amp;sid=$sid\">«Prev</a> ";
        }
        if($page<$num_pages)
        {
          $npage = $page+1;
          echo "<a href=\"inbox.php?action=popdialog&amp;page=$npage&amp;sid=$sid\">Next»</a>";
        }
        echo "
    $page/$num_pages
    ";
        if($num_pages>2)
        {
        $rets = "<form action=\"inbox.php\" method=\"get\">";
          $rets .= "<input name=\"page\" style=\"-wap-input-format: &#39;*N&#39;\" size=\"2\"/>";
          $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\">";
          $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\">";
          $rets .= "<input type=\"Submit\" name=\"Submit\" Value=\"Go To Page\"></form>";
          echo $rets;
          }
          }else{
            echo "<p align=\"center\">";
            echo "NO DATA";
          }
      echo "[b]6 [/b]<a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>
    ";
      echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a>
    ";
      echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\">Chat</a>
    ";
      echo forumlink($sid,9);
      echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p></body>";
      }
    else if($action=="main")
    {
      addonline(getuid_sid($sid),"User Inbox","inbox.php?action=$action");
      echo "<head>";
      echo "<title>Inbox</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";
    
    ?>
    
    <head>
    <META HTTP-EQUIV="Refresh" Content="10">
    </head>
    
    <?php
    
      echo "<body>";
    
      echo "<p align=\"center\">";
      echo "[b]1 [/b]<a accesskey=\"1\" href=\"inbox.php?action=sendto&amp;sid=$sid\">Send New Msg</a>";
      echo "</p>";
      echo "<p align=\"center\">";
    
        $view = $_GET["view"];
        //////ALL LISTS SCRIPT <<
        if($view=="")$view="all";
        if($page=="" || $page<=0)$page=1;
        $myid = getuid_sid($sid);
        $doit=false;
        $num_items = getpmcount($myid,$view); //changable
        $items_per_page= 7;
        $num_pages = ceil($num_items/$items_per_page);
        if($page>$num_pages)$page= $num_pages;
        $limit_start = ($page-1)*$items_per_page;
        if($num_items>0)
        {
          if($doit)
          {
            $exp = "&amp;rwho=$myid";
          }else
          {
            $exp = "";
          }
        //changable sql
        if($view=="all")
      {
        $sql = "SELECT
                a.name, b.id, b.byuid, b.unread, b.starred FROM ibwf_users a
                INNER JOIN ibwf_private b ON a.id = b.byuid
                WHERE b.touid=&#39;".$myid."&#39; AND b.starred=&#39;0&#39;
                ORDER BY b.timesent DESC
                LIMIT $limit_start, $items_per_page
        ";
      }else if($view=="snt")
      {
        $sql = "SELECT
                a.name, b.id, b.touid, b.unread, b.starred FROM ibwf_users a
                INNER JOIN ibwf_private b ON a.id = b.touid
                WHERE b.byuid=&#39;".$myid."&#39;
                ORDER BY b.timesent DESC
                LIMIT $limit_start, $items_per_page
        ";
      }else if($view=="str")
      {
        $sql = "SELECT
                a.name, b.id, b.byuid, b.unread, b.starred FROM ibwf_users a
                INNER JOIN ibwf_private b ON a.id = b.byuid
                WHERE b.touid=&#39;".$myid."&#39; AND b.starred=&#39;1&#39;
                ORDER BY b.timesent DESC
                LIMIT $limit_start, $items_per_page
        ";
      }else if($view=="urd")
      {
        $sql = "SELECT
                a.name, b.id, b.byuid, b.unread, b.starred FROM ibwf_users a
                INNER JOIN ibwf_private b ON a.id = b.byuid
                WHERE b.touid=&#39;".$myid."&#39; AND b.unread=&#39;1&#39;
                ORDER BY b.timesent DESC
                LIMIT $limit_start, $items_per_page
        ";
      }
        $items = mysql_query($sql);
        echo mysql_error();
        while ($item = mysql_fetch_array($items))
        {
          if($item[3]=="1")
          {
            $iml = "<img src=\"../images/npm.gif\" alt=\"+\"/>";
          }else{
            if($item[4]=="1")
            {
                $iml = "<img src=\"../images/spm.gif\" alt=\"*\"/>";
            }else{
    
            $iml = "<img src=\"../images/opm.gif\" alt=\"-\"/>";
            }
          }
          if($lastloc=="cht"){
          $lnk = "<a href=\"inbox.php?action=readpm&amp;pmid=$item[1]&amp;sid=$sid&amp;lstloc=cht&amp;rid=$rid\">$iml $item[0]</a>";
        }else{
              $lnk = "<a href=\"inbox.php?action=readpm&amp;pmid=$item[1]&amp;sid=$sid\">$iml $item[0]</a>";
        }
          echo "$lnk
    ";
        }
        echo "</p>";
        echo "<p align=\"center\">";
        
          $npage = $page+1;
    
        if($page>1)
        {
          $ppage = $page-1;
          if($lastloc=="cht"){
    echo "<a href=\"inbox.php?action=main&amp;page=$ppage&amp;sid=$sid&amp;view=$view$exp&amp;lstloc=cht&amp;rid=$rid\">«Prev</a> ";
        }else{
    echo "<a href=\"inbox.php?action=main&amp;page=$ppage&amp;sid=$sid&amp;view=$view$exp\">«Prev</a> ";
        }
          
        }
        if($page<$num_pages)
        {
          $npage = $page+1;
          if($lastloc=="cht"){
          echo "<a href=\"inbox.php?action=main&amp;page=$npage&amp;sid=$sid&amp;view=$view$exp&amp;lstloc=cht&amp;rid=$rid\">Next»</a>";
        }else{
        echo "<a href=\"inbox.php?action=main&amp;page=$npage&amp;sid=$sid&amp;view=$view$exp\">Next»</a>";
        }
        }
        echo "</p>";
        echo "<p align=\"center\">";
        echo "$page/$num_pages";
        echo "</p>";
        echo "<p align=\"center\">";
        if($num_pages>2)
        {
          if($lastloc=="cht"){
            $rets = "<form action=\"inbox.php&amp;lstloc=cht&amp;rid=$rid\" method=\"get\">";
        }else{
            $rets = "<form action=\"inbox.php\" method=\"get\">";
        }
        $rets .= "<input name=\"page\" style=\"-wap-input-format: &#39;*N&#39;\" size=\"3\"/>";
        $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
        $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
        $rets .= "<input type=\"hidden\" name=\"view\" value=\"$view\"/>";
        $rets .= "<input type=\"Submit\" value=\"Go To Page\" Name=\"Submit\"/></form>";
    
            echo $rets;
        }
    
      echo "</p>";
      echo "<p align=\"center\">";
        }else{
          echo "You have no Inbox Messages
    
    ";
        }
      ////// UNTILL HERE >>
    
      if($lastloc=="cht")
      {
      echo "[b]1 [/b]<a accesskey=\"1\" href=\"chat.php?sid=$sid&amp;rid=$rid\">Back to $rname</a>
    ";
      }
      echo "[b]2 [/b]<a accesskey=\"2\" href=\"inbox.php?action=main&amp;time=date(&#39;dmHis&#39;)&amp;sid=$sid\">Refresh</a>
    ";
      if($view=="all"){
      if($lastloc=="cht"){
      echo "[b]3 [/b]<a accesskey=\"3\" href=\"inbxproc.php?action=proall&amp;sid=$sid&amp;lstloc=cht&amp;rid=$rid\">Delete All</a>
    ";
      }else{
      echo "[b]3 [/b]<a accesskey=\"3\" href=\"inbxproc.php?action=proall&amp;sid=$sid\">Delete All</a>
    ";
      }
      }
      if($view=="all"){
      $count = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users a INNER JOIN ibwf_private b ON a.id = b.touid WHERE b.byuid=&#39;".$myid."&#39;"));
      if($lastloc=="cht"){
      echo "[b]4 [/b]<a accesskey=\"4\" href=\"inbox.php?action=$action&amp;sid=$sid&amp;view=snt&amp;lstloc=cht&amp;rid=$rid\">Outbox($count[0])</a>
    ";
      }else{
      echo "[b]4 [/b]<a accesskey=\"4\" href=\"inbox.php?action=$action&amp;sid=$sid&amp;view=snt\">Outbox($count[0])</a>
    ";
      }
      }
      if($view=="all"){
      $count = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users a INNER JOIN ibwf_private b ON a.id = b.byuid WHERE b.touid=&#39;".$myid."&#39; AND b.starred=&#39;1&#39;"));
      if($lastloc=="cht"){
      echo "[b]5 [/b]<a accesskey=\"5\" href=\"inbox.php?action=$action&amp;sid=$sid&amp;view=str&amp;lstloc=cht&amp;rid=$rid\">Starred($count[0])</a>
    ";
      }else{
      echo "[b]5 [/b]<a accesskey=\"5\" href=\"inbox.php?action=$action&amp;sid=$sid&amp;view=str\">Starred($count[0])</a>
    ";
      }
      }else{
      if($lastloc=="cht"){
      echo "[b]6 [/b]<a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid&amp;lstloc=cht&amp;rid=$rid\">Inbox</a>
    ";
      }else{
      echo "[b]6 [/b]<a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>
    ";
      }
      }
      echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a>
    ";
      echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\">Chat</a>
    ";
      echo forumlink($sid,9);
      echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p>";
      echo "</body>";
    }
    else if($action=="readpm")
    {
      addonline(getuid_sid($sid),"Reading Inbox","inbox.php?action=$action");
      echo "<head>";
      echo "<title>Read Inbox</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";
      echo "<body>";
      echo "
    
    ";
    
      $pminfo = mysql_fetch_array(mysql_query("SELECT text, byuid, timesent,touid, reported FROM ibwf_private WHERE id=&#39;".$pmid."&#39;"));
      if(getuid_sid($sid)==$pminfo[3])
      {
        $chread = mysql_query("UPDATE ibwf_private SET unread=&#39;0&#39; WHERE id=&#39;".$pmid."&#39;");
      }
      
      if(($pminfo[3]==getuid_sid($sid))||($pminfo[1]==getuid_sid($sid)))
      {
      
      if(getuid_sid($sid)==$pminfo[3])
      {
        if(isonline($pminfo[1]))
      {
        $iml = "<img src=\"../images/onl.gif\" alt=\"+\"/>";
      }else{
        $iml = "<img src=\"../images/ofl.gif\" alt=\"-\"/>";
      }
        $ptxt = "Inbox By: ";
        
            $bylnk = "<a href=\"index.php?action=viewuser&amp;who=$pminfo[1]&amp;sid=$sid\">$iml".getnick_uid($pminfo[1])."</a>";
    
      }else{
        if(isonline($pminfo[3]))
      {
        $iml = "<img src=\"../images/onl.gif\" alt=\"+\"/>";
      }else{
        $iml = "<img src=\"../images/ofl.gif\" alt=\"-\"/>";
      }
        $ptxt = "Inbox To: ";
        
        $bylnk = "<a href=\"index.php?action=viewuser&amp;who=$pminfo[3]&amp;sid=$sid\">$iml".getnick_uid($pminfo[3])."</a>";
        
      }
      
      echo "$ptxt $bylnk
    ";
      $tmstamp = $pminfo[2];
      $tmdt = date("d m Y - H:i:s", $tmstamp);
      echo "$tmdt
    
    ";
      $pmtext = parsepm($pminfo[0], $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[3]), $pmtext);
        if(isspam($pmtext))
        {
          if(($pminfo[4]=="0") && ($pminfo[1]!=1))
          {
            mysql_query("UPDATE ibwf_private SET reported=&#39;1&#39; WHERE id=&#39;".$pmid."&#39;");
          }
        }
        echo $pmtext;
      echo "</p>";
      echo "<p align=\"center\">";
       if($lastloc=="cht"){
          echo "<form action=\"inbxproc.php?action=proc&amp;sid=$sid&amp;lstloc=cht&amp;rid=$rid\" method=\"post\">";
        }else{
          echo "<form action=\"inbxproc.php?action=proc&amp;sid=$sid\" method=\"post\">";
          }
      echo "Action: <select name=\"pmact\">";
      echo "<option value=\"rep-$pmid\">Reply</option>";
      echo "<option value=\"del-$pmid\">Delete</option>";
      if(isstarred($pmid))
      {
        echo "<option value=\"ust-$pmid\">Unstar</option>";
      }else{
      echo "<option value=\"str-$pmid\">Star</option>";
      }
      echo "<option value=\"rpt-$pmid\">Report</option>";
      
        echo "<option value=\"frd-$pmid\">Email To</option>";
        echo "<option value=\"dnl-$pmid\">Download</option>";
      
      echo "</select>";
      echo "<input type=\"Submit\" Name=\"GO\" Value=\"Ok!\"></form>";
      echo "[b]4 [/b]<a accesskey=\"4\" href=\"inbox.php?action=dialog&amp;sid=$sid&amp;who=$pminfo[1]\">Dialog</a>
    ";
     if($lastloc=="cht"){
      echo "[b]5 [/b]<a accesskey=\"5\" href=\"chat.php?sid=$sid&amp;rid=$rid\">Back to $rname</a>
    ";
      echo "[b]6 [/b]<a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>
    ";
      echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a>
    ";
      echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\">Chat</a>
    ";
      echo forumlink($sid,9);
      echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
        echo "</p></body>";
        }else{
      echo "[b]6 [/b]<a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>
    ";
      echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a>
    ";
      echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\">Chat</a>
    ";
      echo forumlink($sid,9);
      echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p>";
        echo "</body>";
    }
      }else{
        echo "<img src=\"../images/notok.gif\" alt=\"X\"/>This Inbox ain&#39;t yours";
      echo "[b]6 [/b]<a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>
    ";
      echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a>
    ";
      echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\">Chat</a>
    ";
      echo forumlink($sid,9);
      echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p>";
        echo "</body>";
    }
    
    }else if($action=="dialog")
    {
        addonline(getuid_sid($sid),"Viewing Inbox Dialog","inbox.php?action=$action");
      echo "<head>";
      echo "<title>Inbox Dialog</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";
      echo "<body>";
      $uid = getuid_sid($sid);
      if($page=="" || $page<=0)$page=1;
        $myid = getuid_sid($sid);
        $pms = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE (byuid=$uid AND touid=$who) OR (byuid=$who AND touid=$uid) ORDER BY timesent"));
        echo mysql_error();
        $num_items = $pms[0]; //changable
        $items_per_page= 7;
        $num_pages = ceil($num_items/$items_per_page);
        if($page>$num_pages)$page= $num_pages;
        $limit_start = ($page-1)*$items_per_page;
        if($num_items>0)
        {
          echo "
    
    ";
          $pms = mysql_query("SELECT byuid, text, timesent FROM ibwf_private WHERE (byuid=$uid AND touid=$who) OR (byuid=$who AND touid=$uid) ORDER BY timesent LIMIT $limit_start, $items_per_page");
          while($pm=mysql_fetch_array($pms))
          {
                if(isonline($pm[0]))
      {
        $iml = "<img src=\"../images/onl.gif\" alt=\"+\"/>";
      }else{
        $iml = "<img src=\"../images/ofl.gif\" alt=\"-\"/>";
      }
      $bylnk = "<a href=\"index.php?action=viewuser&amp;who=$pm[0]&amp;sid=$sid\">$iml".getnick_uid($pm[0])."</a>";
      echo $bylnk;
      $tmopm = date("d m y - h:i:s",$pm[2]);
      echo " [size="1"]$tmopm
    ";
      
            echo parsepm($pm[1], $sid);
    
      
      echo "[/size]";
      echo "
    --------------
    ";
          }
          echo "</p><p align=\"center\">";
          if($page>1)
        {
          $ppage = $page-1;
          echo "<a href=\"inbox.php?action=dialog&amp;page=$ppage&amp;sid=$sid&amp;who=$who\">«PREV</a> ";
        }
        if($page<$num_pages)
        {
          $npage = $page+1;
          echo "<a href=\"inbox.php?action=dialog&amp;page=$npage&amp;sid=$sid&amp;who=$who\">Next»</a>";
        }
        echo "
    $page/$num_pages
    ";
        if($num_pages>2)
        {
        $rets = "<form action=\"inbox.php\" method=\"get\">";
          $rets .= "<input name=\"page\" style=\"-wap-input-format: &#39;*N&#39;\" size=\"2\"/>";
          $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\">";
          $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\">";
          $rets .= "<input type=\"hidden\" name=\"who\" value=\"$who\">";
          $rets .= "<input type=\"Submit\" name=\"Submit\" Value=\"Go To Page\"></form>";
          echo $rets;
          }
          }else{
            echo "<p align=\"center\">";
            echo "NO DATA";
          }
          echo "
    
    [b]4 [/b]<a accesskey=\"4\" href=\"rwdpm.php?action=dlg&amp;sid=$sid&amp;who=$who\">Download</a>
    only first 50 messages
    ";
               if($lastloc=="cht"){
                echo "
    [b]5 [/b]<a accesskey=\"5\" href=\"chat.php?sid=$sid&amp;rid=$rid\">Back to $rname</a>
    ";
      echo "[b]6 [/b]<a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>
    ";
      echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a>
    ";
      echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\">Chat</a>
    ";
      echo forumlink($sid,9);
      echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p></body>";
    }else{
      echo "[b]6 [/b]<a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>
    ";
      echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a>
    ";
      echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\">Chat</a>
    ";
      echo forumlink($sid,9);
      echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p></body>";
    }
      }
        else{
          addonline(getuid_sid($sid),"Lost in inbox lol","");
      echo "<head>";
      echo "<title>Error!!!</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";
      echo "<body>";
      echo "<p align=\"center\">";
      echo "I don&#39;t know how did you get into here, but there&#39;s nothing to show
    ";
      echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p></body>";
    }
    ?>
    </html>
    Want something coded email me at sales@webnwaphost.com for a prices.




    Comment


      #3
      there ya go dave the line i added was
      Code:
      ?>
      
      <head>
      <META HTTP-EQUIV="Refresh" Content="10">
      </head>
      
      <?php
      so in the the script itl look like

      Code:
      echo "<head>";
        echo "<title>Inbox</title>";
        echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
        echo "</head>";
      
      ?>
      
      <head>
      <META HTTP-EQUIV="Refresh" Content="10">
      </head>
      
      <?php
      
        echo "<body>";
      Want something coded email me at sales@webnwaphost.com for a prices.




      Comment


        #4
        there ya go dave the line i added was
        Code:
        ?>
        
        <head>
        <META HTTP-EQUIV="Refresh" Content="10">
        </head>
        
        <?php
        so in the the script itl look like

        Code:
        echo "<head>";
          echo "<title>Inbox</title>";
          echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo "</head>";
        
        ?>
        
        <head>
        <META HTTP-EQUIV="Refresh" Content="10">
        </head>
        
        <?php
        
          echo "<body>";
        [/b]

        cheers bro .
        Wapchat4u


        Topsites4u

        Comment


          #5
          no probs
          Want something coded email me at sales@webnwaphost.com for a prices.




          Comment


            #6
            here is for WML

            echo "<card id=\"main\" title=\"Site Title\" ontimer=\"index.php?time=";
            echo date(&#39;dmHis&#39;);
            echo "&amp;action=main&amp;sid=$sid";
            echo "\">";
            echo "<timer value=\"600\"/>";

            600 for 60 seconds

            and here for xHTML

            echo "<meta http-equiv=\"refresh\" content=\"30; URL=";
            echo "index.php?action=main&amp;sid=$sid\"/>";

            Comment

            Working...
            X