Refresh Page

Started on the old forum in April 2008 · view the original in the archive · old links redirect here

5 replies · 707 views · started 18 years ago · 1 min read

3 participants
nclemale36 Lead · 537 posts #1

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 " "; echo "1<a accesskey="1" href="inbox.php?action=sendto&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 '<meta http-equiv="Refresh" content="10; URL=http://yoursite.example/inbox.php?action=main&amp;sid=$sid" />';

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.

crazybrumi Super moderator Principal · 1,064 posts #2
<?php
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
//header('Content-type: application/vnd.wap.xhtml+xml'); 
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='sitename'"));
$sitename = $sitename[0];
$uid = getuid_sid($sid);
$theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
$lastloc=$_GET["lstloc"];

if($lastloc=="cht"){
    $rid= $_GET["rid"];
    $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
    $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='".$uid."' AND penalty='1' OR uid='".$uid."' AND penalty='2'"));
    $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));
      $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&who=$who&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&sid=$sid\">Inbox</a>
";
  echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&sid=$sid\">BuddyList</a>
";
  echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&sid=$sid\">Chat</a>
";
  echo forumlink($sid,9);
  echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&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&sid=$sid\">BuddyList</a>
";
    echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&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&who=$who&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&sid=$sid\">Inbox</a>
";
  echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&sid=$sid\">BuddyList</a>
";
  echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&sid=$sid\">Chat</a>
";
  echo forumlink($sid,9);
  echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&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&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&sid=$sid\">Inbox</a>
";
  echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&sid=$sid\">BuddyList</a>
";
  echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&sid=$sid\">Chat</a>
";
  echo forumlink($sid,9);
  echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&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&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&sid=$sid\">Inbox</a>
";
  echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&sid=$sid\">BuddyList</a>
";
  echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&sid=$sid\">Chat</a>
";
  echo forumlink($sid,9);
  echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&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&who=$pm[0]&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&page=$ppage&sid=$sid\">«Prev</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"inbox.php?action=popdialog&page=$npage&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: '*N'\" 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&sid=$sid\">Inbox</a>
";
  echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&sid=$sid\">BuddyList</a>
";
  echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&sid=$sid\">Chat</a>
";
  echo forumlink($sid,9);
  echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&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&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 = "&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='".$myid."' AND b.starred='0'
            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='".$myid."'
            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='".$myid."' AND b.starred='1'
            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='".$myid."' AND b.unread='1'
            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&pmid=$item[1]&sid=$sid&lstloc=cht&rid=$rid\">$iml $item[0]</a>";
    }else{
          $lnk = "<a href=\"inbox.php?action=readpm&pmid=$item[1]&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&page=$ppage&sid=$sid&view=$view$exp&lstloc=cht&rid=$rid\">«Prev</a> ";
    }else{
echo "<a href=\"inbox.php?action=main&page=$ppage&sid=$sid&view=$view$exp\">«Prev</a> ";
    }
      
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      if($lastloc=="cht"){
      echo "<a href=\"inbox.php?action=main&page=$npage&sid=$sid&view=$view$exp&lstloc=cht&rid=$rid\">Next»</a>";
    }else{
    echo "<a href=\"inbox.php?action=main&page=$npage&sid=$sid&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&lstloc=cht&rid=$rid\" method=\"get\">";
    }else{
        $rets = "<form action=\"inbox.php\" method=\"get\">";
    }
    $rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" 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&rid=$rid\">Back to $rname</a>
";
  }
  echo "[b]2 [/b]<a accesskey=\"2\" href=\"inbox.php?action=main&time=date('dmHis')&sid=$sid\">Refresh</a>
";
  if($view=="all"){
  if($lastloc=="cht"){
  echo "[b]3 [/b]<a accesskey=\"3\" href=\"inbxproc.php?action=proall&sid=$sid&lstloc=cht&rid=$rid\">Delete All</a>
";
  }else{
  echo "[b]3 [/b]<a accesskey=\"3\" href=\"inbxproc.php?action=proall&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='".$myid."'"));
  if($lastloc=="cht"){
  echo "[b]4 [/b]<a accesskey=\"4\" href=\"inbox.php?action=$action&sid=$sid&view=snt&lstloc=cht&rid=$rid\">Outbox($count[0])</a>
";
  }else{
  echo "[b]4 [/b]<a accesskey=\"4\" href=\"inbox.php?action=$action&sid=$sid&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='".$myid."' AND b.starred='1'"));
  if($lastloc=="cht"){
  echo "[b]5 [/b]<a accesskey=\"5\" href=\"inbox.php?action=$action&sid=$sid&view=str&lstloc=cht&rid=$rid\">Starred($count[0])</a>
";
  }else{
  echo "[b]5 [/b]<a accesskey=\"5\" href=\"inbox.php?action=$action&sid=$sid&view=str\">Starred($count[0])</a>
";
  }
  }else{
  if($lastloc=="cht"){
  echo "[b]6 [/b]<a accesskey=\"6\" href=\"inbox.php?action=main&sid=$sid&lstloc=cht&rid=$rid\">Inbox</a>
";
  }else{
  echo "[b]6 [/b]<a accesskey=\"6\" href=\"inbox.php?action=main&sid=$sid\">Inbox</a>
";
  }
  }
  echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&sid=$sid\">BuddyList</a>
";
  echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&sid=$sid\">Chat</a>
";
  echo forumlink($sid,9);
  echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&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='".$pmid."'"));
  if(getuid_sid($sid)==$pminfo[3])
  {
    $chread = mysql_query("UPDATE ibwf_private SET unread='0' WHERE id='".$pmid."'");
  }
  
  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&who=$pminfo[1]&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&who=$pminfo[3]&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&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='1' WHERE id='".$pmid."'");
      }
    }
    echo $pmtext;
  echo "</p>";
  echo "<p align=\"center\">";
   if($lastloc=="cht"){
      echo "<form action=\"inbxproc.php?action=proc&sid=$sid&lstloc=cht&rid=$rid\" method=\"post\">";
    }else{
      echo "<form action=\"inbxproc.php?action=proc&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&sid=$sid&who=$pminfo[1]\">Dialog</a>
";
 if($lastloc=="cht"){
  echo "[b]5 [/b]<a accesskey=\"5\" href=\"chat.php?sid=$sid&rid=$rid\">Back to $rname</a>
";
  echo "[b]6 [/b]<a accesskey=\"6\" href=\"inbox.php?action=main&sid=$sid\">Inbox</a>
";
  echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&sid=$sid\">BuddyList</a>
";
  echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&sid=$sid\">Chat</a>
";
  echo forumlink($sid,9);
  echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&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&sid=$sid\">Inbox</a>
";
  echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&sid=$sid\">BuddyList</a>
";
  echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&sid=$sid\">Chat</a>
";
  echo forumlink($sid,9);
  echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&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't yours";
  echo "[b]6 [/b]<a accesskey=\"6\" href=\"inbox.php?action=main&sid=$sid\">Inbox</a>
";
  echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&sid=$sid\">BuddyList</a>
";
  echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&sid=$sid\">Chat</a>
";
  echo forumlink($sid,9);
  echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&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&who=$pm[0]&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&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"inbox.php?action=dialog&page=$npage&sid=$sid&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: '*N'\" 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&sid=$sid&who=$who\">Download</a>
only first 50 messages
";
           if($lastloc=="cht"){
            echo "
[b]5 [/b]<a accesskey=\"5\" href=\"chat.php?sid=$sid&rid=$rid\">Back to $rname</a>
";
  echo "[b]6 [/b]<a accesskey=\"6\" href=\"inbox.php?action=main&sid=$sid\">Inbox</a>
";
  echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&sid=$sid\">BuddyList</a>
";
  echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&sid=$sid\">Chat</a>
";
  echo forumlink($sid,9);
  echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&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&sid=$sid\">Inbox</a>
";
  echo "[b]7 [/b]<a accesskey=\"7\" href=\"lists.php?action=buds&sid=$sid\">BuddyList</a>
";
  echo "[b]8 [/b]<a accesskey=\"8\" href=\"index.php?action=chat&sid=$sid\">Chat</a>
";
  echo forumlink($sid,9);
  echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&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't know how did you get into here, but there's nothing to show
";
  echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&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.

http://flagcounter.com/more/W80q

crazybrumi Super moderator Principal · 1,064 posts #3

there ya go dave the line i added was

?>

<head>
<META HTTP-EQUIV="Refresh" Content="10">
</head>

<?php

so in the the script itl look like

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.

http://flagcounter.com/more/W80q

nclemale36 Lead · 537 posts #4

there ya go dave the line i added was

?>

<head>
<META HTTP-EQUIV="Refresh" Content="10">
</head>

<?php

so in the the script itl look like

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>";

cheers bro .

SiLeNce Developer · 138 posts #6

here is for WML

echo "<card id="main" title="Site Title" ontimer="index.php?time="; echo date('dmHis'); echo "&action=main&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&sid=$sid"/>";

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close