Script At Inbox.php

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Script At Inbox.php

    Hallooo,

    Who can give me script at inbox.php?

    Example:
    -----------------------------------------------
    Inbox

    New(0)
    Old(0)


    *Create New Folder*
    *Send PM*

    Home
    -----------------------------------------------

    Please Help Me..Thanks

    #2
    search for methos's script.

    Comment


      #3
      Ok thanks...where i can search?

      Comment


        #4
        Use the search option at the top of the page

        Comment


          #5
          i search but not found...???

          Please help me ok...

          Comment


            #6
            message methos for it. i dont have that script

            Comment


              #7
              i use it...

              Click here!!!

              Comment


                #8
                SpiderWap, You Wanna give me? Haha i am was tired for making it....i always get error....

                Comment


                  #9
                  <?php
                  /*
                  IrisBlaze wap forum
                  by Ra&#39;ed Shabana
                  */
                  include("xhtmlfunctions.php");
                  header("Content-type: text/html; charset=ISO-8859-1");
                  echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
                  echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
                  ?>

                  <?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)
                  {
                  $pstyle = gettheme1("1");
                  echo xhtmlhead("blingywap",$pstyle);
                  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 xhtmlfoot();
                  exit();
                  }
                  $uid = getuid_sid($sid);
                  if(isbanned($uid))
                  {
                  $pstyle = gettheme($sid);
                  echo xhtmlhead("blingywap",$pstyle);
                  echo "<p align=\"center\">";
                  echo "<img src=\"images/notok.gif\" alt=\"x\"/>
                  ";
                  echo "You are Banned
                  ";
                  $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_metpenaltiespl WHERE uid=&#39;".$uid."&#39; AND penalty=&#39;1&#39;"));
                  $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));

                  $remain = $banto[0]- (time() - $timeadjust) ;
                  $rmsg = gettimemsg($remain);
                  echo "Time to finish your penalty: $rmsg

                  ";
                  echo "Ban Reason: $banres[0]";
                  //echo "<a href=\"index.php\">Login</a>";
                  echo "</p>";
                  echo xhtmlfoot();
                  exit();
                  }

                  if($action=="sendpm")
                  {
                  $mid = getnick_uid($who);

                  addonline(getuid_sid($sid),"Sending PM to $mid","");
                  $pstyle = gettheme($sid);
                  echo xhtmlhead("Inbox",$pstyle);
                  echo "<p align=\"center\">";
                  $whonick = getnick_uid($who);
                  echo "Send PM to $whonick

                  ";
                  echo "<form action=\"inbxproc.php?action=sendpm&amp;who=$who&a mp;sid=$sid\" method=\"post\">";
                  echo "<input name=\"pmtext\" maxlength=\"500\"/>
                  ";
                  echo "<input type=\"submit\" value=\"SEND\"/>";
                  echo "</form>";
                  echo "
                  ";
                  $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                  $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id=&#39;".$thid[0]."&#39;"));
                  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();

                  }
                  else if($action=="sendto")
                  { $abc = getnick_uid($who);

                  addonline(getuid_sid($sid),"Sending PM to $abc","");
                  $pstyle = gettheme($sid);
                  echo xhtmlhead("Inbox",$pstyle);

                  echo "<p align=\"center\">";
                  $whonick = getnick_uid($who);
                  echo "Send PM 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\" value=\"SEND\"/>";
                  echo "</form>";

                  echo "

                  ";
                  $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                  $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id=&#39;".$thid[0]."&#39;"));
                  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();

                  }
                  else if($action=="renamefolder")
                  {
                  addonline(getuid_sid($sid),"Renaming PM Folder","");
                  $pstyle = gettheme($sid);
                  echo xhtmlhead("Renaming PM Folder",$pstyle);

                  echo "<p align=\"center\">";
                  $folderid = $_GET["fid"];
                  $foldername = mysql_fetch_array(mysql_query("SELECT foldername FROM ibwf_private_folders WHERE folderid=&#39;".$folderid."&#39;"));
                  echo "Renaming Folder: $foldername[0]

                  ";
                  echo "<form action=\"inbox.php?action=rnamefdone&amp;sid=$sid\ " method=\"post\">";
                  echo "New Folder Name: <input name=\"newname\" format=\"*x\" maxlength=\"25\"/>
                  ";
                  echo "<input type=\"hidden\" name=\"fid\" value=\"$folderid\"/>";
                  echo "<input type=\"submit\" value=\"Rename\"/>";
                  echo "</form>";

                  echo "

                  ";
                  $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                  $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id=&#39;".$thid[0]."&#39;"));
                  echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">«Back to Inbox</a>
                  ";
                  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();

                  }
                  else if($action=="rnamefdone")
                  {
                  addonline(getuid_sid($sid),"Renaming PM Folder","");
                  $pstyle = gettheme($sid);
                  echo xhtmlhead("Renaming PM Folder",$pstyle);
                  $folderid = $_POST["fid"];
                  $newname = $_POST["newname"];

                  echo "<p align=\"center\">";

                  $res = mysql_query("UPDATE ibwf_private_folders SET foldername=&#39;".$newname."&#39; WHERE folderid=&#39;".$folderid."&#39;");

                  if($res)
                  {
                  echo "<img src=\"images/ok.gif\" alt=\"O\"/>Folder Renamed Successfully

                  ";
                  }else{
                  echo "<img src=\"images/notok.gif\" alt=\"O\"/>Rename Error!

                  ";
                  }

                  echo "

                  ";
                  $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                  $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id=&#39;".$thid[0]."&#39;"));
                  echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">«Back to Inbox</a>
                  ";
                  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();

                  }
                  else if($action=="delfolder")
                  {
                  addonline(getuid_sid($sid),"Deleting PM Folder","");
                  $pstyle = gettheme($sid);
                  echo xhtmlhead("Deleting PM Folder",$pstyle);

                  echo "<p align=\"center\">";

                  $folderid = $_POST["fid"];
                  $res = mysql_query("DELETE FROM ibwf_private_folders WHERE folderid=&#39;".$folderid."&#39;");


                  $sql = "SELECT folderid FROM ibwf_private WHERE folderid=&#39;".$folderid."&#39;";
                  $items = mysql_query($sql);
                  echo mysql_error();
                  if(mysql_num_rows($items)>0)
                  {
                  while ($item = mysql_fetch_array($items))
                  {
                  $sql = mysql_query("UPDATE ibwf_private SET folderid=&#39;0&#39; WHERE folderid=&#39;".$folderid."&#39;");
                  }
                  }

                  if($res)
                  {
                  echo "<img src=\"images/ok.gif\" alt=\"O\"/>Folder Deleted Successfully

                  ";
                  }else{
                  echo "<img src=\"images/notok.gif\" alt=\"O\"/>Delete Error!

                  ";
                  }

                  echo "

                  ";
                  $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                  $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id=&#39;".$thid[0]."&#39;"));
                  echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">«Back to Inbox</a>
                  ";
                  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();

                  }

                  else if($action=="main")
                  {
                  addonline(getuid_sid($sid),"User Inbox","");
                  $pstyle = gettheme($sid);
                  echo xhtmlhead("Inbox",$pstyle);
                  echo "<p align=\"center\">";
                  echo "Inbox";
                  echo "</p>";

                  echo "<div class=\"mblock1\">";
                  echo "";
                  $uid = getuid_sid($sid);

                  $umsg = getunreadpm(getuid_sid($sid));
                  $tmsg = getpmcount(getuid_sid($sid));
                  $read = $tmsg - $umsg;
                  $readpmnotinfolder = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid=&#39;".$uid."&#39; AND unread=&#39;0&#39; AND folderid=&#39;0&#39;"));
                  echo "<img src=\"images/star.gif\" alt=\"*\"/><a href=\"inbox.php?action=folderunread&amp;sid=$sid\ ">New</a>($umsg)
                  ";
                  echo "<img src=\"images/hot.gif\" alt=\"*\"/><a href=\"inbox.php?action=folderread&amp;sid=$sid\"> Old</a>($readpmnotinfolder[0])

                  ";

                  $sql = "SELECT foldername, folderid FROM ibwf_private_folders WHERE uid=&#39;".$uid."&#39; ORDER BY foldername DESC";
                  $items = mysql_query($sql);
                  echo mysql_error();
                  if(mysql_num_rows($items)>0)
                  {
                  while ($item = mysql_fetch_array($items))
                  {
                  $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid=&#39;".$uid."&#39; AND folderid=&#39;".$item[1]."&#39;"));
                  $lnk = "<img src=\"mailbox_folder.gif\" alt=\"*\"/><a href=\"inbox.php?action=folder&amp;folderid=$item[1]&amp;sid=$sid\">$item[0]</a>($noi[0])";
                  echo "$lnk
                  ";
                  }
                  }

                  echo "
                  ";
                  echo "<center><a href=\"inbox.php?action=crfolder&amp;sid=$sid\">*C reate New Folder*</a></center>";
                  echo "<center><a href=\"inbox.php?action=sendto&amp;sid=$sid\">*Sen d PM*</a></center>";
                  echo "
                  ";
                  echo "
                  ";
                  ////// UNTILL HERE >>



                  echo "<p align=\"center\">";

                  $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                  $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id=&#39;".$thid[0]."&#39;"));
                  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();
                  }
                  else if($action=="folderread")
                  {
                  addonline(getuid_sid($sid),"User Inbox","");
                  $pstyle = gettheme($sid);
                  echo xhtmlhead("Inbox - Read",$pstyle);
                  echo "<p align=\"center\">";
                  echo "Read";
                  echo "</p>";
                  $view = $_GET["view"];
                  //////ALL LISTS SCRIPT <<
                  if($view=="")$view="all";
                  if($page=="" || $page<=0)$page=1;
                  $myid = getuid_sid($sid);
                  $doit=false;
                  $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid=&#39;".$uid."&#39; AND unread=&#39;0&#39;"));
                  $num_items = $noi[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)
                  {
                  if($doit)
                  {
                  $exp = "&amp;rwho=$myid";
                  }else
                  {
                  $exp = "";
                  }
                  //changable sql

                  $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;0&#39;
                  ORDER BY b.timesent DESC
                  LIMIT $limit_start, $items_per_page
                  ";
                  echo "<div class=\"mblock1\">";
                  echo "";
                  $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=\"-\"/>";
                  }
                  }

                  $lnk = "<a href=\"inbox.php?action=readpm&amp;pmid=$item[1]&amp;sid=$sid\">$iml $item[0]</a>";
                  echo "$lnk
                  ";
                  }
                  echo "
                  ";
                  echo "</div>";
                  echo "<p align=\"center\">";

                  $npage = $page+1;
                  echo "<a href=\"inbox.php?action=sendto&amp;sid=$sid\">Send to</a>
                  ";
                  if($page>1)
                  {
                  $ppage = $page-1;
                  echo "<a href=\"inbox.php?action=folderread&amp;page=$ppage &amp;sid=$sid&amp;view=$view$exp\">«Prev</a> ";
                  }
                  if($page<$num_pages)
                  {
                  $npage = $page+1;
                  echo "<a href=\"inbox.php?action=folderread&amp;page=$npage &amp;sid=$sid&amp;view=$view$exp\">Next»</a>";
                  }
                  echo "
                  $page/$num_pages
                  ";
                  if($num_pages>2)
                  {
                  $rets = "<form action=\"inbox.php\" method=\"get\">";
                  $rets .= "Jump to page: <input name=\"page\" format=\"*N\" size=\"3\"/>
                  ";
                  $rets .= "<input type=\"submit\" value=\"GO\"/>";
                  $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
                  $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
                  $rets .= "<input type=\"hidden\" name=\"view\" value=\"$view\"/>";
                  $rets .= "</form>";
                  echo $rets;
                  }
                  echo "
                  ";

                  echo "</p>";
                  }else{
                  echo "<p align=\"center\">";
                  echo "You have no Private Messages
                  ";
                  echo "</p>";
                  }
                  ////// UNTILL HERE >>



                  echo "<p align=\"center\">";

                  $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                  $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id=&#39;".$thid[0]."&#39;"));
                  echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">«Back to Inbox</a>
                  ";
                  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();
                  }


                  else if($action=="folderunread")
                  {
                  addonline(getuid_sid($sid),"User Inbox","");
                  $pstyle = gettheme($sid);
                  echo xhtmlhead("Inbox - Unread",$pstyle);
                  echo "<p align=\"center\">";
                  echo "Unread Mail";
                  echo "</p>";
                  $view = $_GET["view"];
                  //////ALL LISTS SCRIPT <<
                  if($view=="")$view="all";
                  if($page=="" || $page<=0)$page=1;
                  $myid = getuid_sid($sid);
                  $doit=false;
                  $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid=&#39;".$uid."&#39; AND unread=&#39;1&#39;"));
                  $num_items = $noi[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)
                  {
                  if($doit)
                  {
                  $exp = "&amp;rwho=$myid";
                  }else
                  {
                  $exp = "";
                  }
                  //changable sql

                  $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
                  ";
                  echo "<div class=\"mblock1\">";
                  echo "";
                  $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=\"-\"/>";
                  }
                  }

                  $lnk = "<a href=\"inbox.php?action=readpm&amp;pmid=$item[1]&amp;sid=$sid\">$iml $item[0]</a>";
                  echo "$lnk
                  ";
                  }
                  echo "
                  ";
                  echo "</div>";
                  echo "<p align=\"center\">";

                  $npage = $page+1;
                  echo "<a href=\"inbox.php?action=sendto&amp;sid=$sid\">Send to</a>
                  ";
                  if($page>1)
                  {
                  $ppage = $page-1;
                  echo "<a href=\"inbox.php?action=folderunread&amp;page=$ppa ge&amp;sid=$sid&amp;view=$view$exp\">«Prev</a> ";
                  }
                  if($page<$num_pages)
                  {
                  $npage = $page+1;
                  echo "<a href=\"inbox.php?action=folderunread&amp;page=$npa ge&amp;sid=$sid&amp;view=$view$exp\">Next»</a>";
                  }
                  echo "
                  $page/$num_pages
                  ";
                  if($num_pages>2)
                  {
                  $rets = "<form action=\"inbox.php\" method=\"get\">";
                  $rets .= "Jump to page: <input name=\"page\" format=\"*N\" size=\"3\"/>
                  ";
                  $rets .= "<input type=\"submit\" value=\"GO\"/>";
                  $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
                  $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
                  $rets .= "<input type=\"hidden\" name=\"view\" value=\"$view\"/>";
                  $rets .= "</form>";
                  echo $rets;
                  }
                  echo "
                  ";

                  echo "</p>";
                  }else{
                  echo "<p align=\"center\">";
                  echo "You have no Private Messages
                  ";
                  echo "<a href=\"inbox.php?action=sendto&amp;sid=$sid\">Send PM</a>
                  ";
                  echo "</p>";
                  }
                  ////// UNTILL HERE >>



                  echo "<p align=\"center\">";

                  $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                  $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id=&#39;".$thid[0]."&#39;"));
                  echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">«Back to Inbox</a>
                  ";
                  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();
                  }


                  else if($action=="folder")
                  {
                  addonline(getuid_sid($sid),"User Inbox","");
                  $pstyle = gettheme($sid);
                  echo xhtmlhead("Inbox",$pstyle);
                  $folderid = $_GET["folderid"];
                  $foldername = mysql_fetch_array(mysql_query("SELECT foldername FROM ibwf_private_folders WHERE folderid=&#39;".$folderid."&#39;"));
                  echo "<p align=\"center\">";
                  echo "Folder $foldername[0]";
                  echo "</p>";
                  //////ALL LISTS SCRIPT <<
                  if($view=="")$view="all";
                  if($page=="" || $page<=0)$page=1;
                  $myid = getuid_sid($sid);
                  $doit=false;
                  $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid=&#39;".$uid."&#39; AND folderid=&#39;".$folderid."&#39;"));
                  $num_items = $noi[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)
                  {
                  if($doit)
                  {
                  $exp = "&amp;rwho=$myid";
                  }else
                  {
                  $exp = "";
                  }
                  //changable sql

                  $sql = "SELECT
                  a.name, b.id, b.byuid, b.unread, b.starred, folderid FROM ibwf_users a
                  INNER JOIN ibwf_private b ON a.id = b.byuid
                  WHERE b.touid=&#39;".$myid."&#39; AND folderid=&#39;".$folderid."&#39;
                  ORDER BY b.timesent DESC
                  LIMIT $limit_start, $items_per_page
                  ";
                  echo "<div class=\"mblock1\">";
                  echo "";
                  $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=\"-\"/>";
                  }
                  }

                  $lnk = "<a href=\"inbox.php?action=readpm&amp;pmid=$item[1]&amp;sid=$sid\">$iml $item[0]</a>";
                  echo "$lnk
                  ";
                  }
                  echo "
                  ";
                  echo "
                  ";
                  echo "<center><a href=\"inbox.php?action=delfolder&amp;fid=$folderi d&amp;sid=$sid\">Delete Folder</a></center>";
                  echo "<center><a href=\"inbox.php?action=renamefolder&amp;fid=$fold erid&amp;sid=$sid\">Rename Folder</a></center>";
                  echo "</div>";
                  echo "<p align=\"center\">";

                  $npage = $page+1;
                  echo "<a href=\"inbox.php?action=sendto&amp;sid=$sid\">Send to</a>
                  ";
                  if($page>1)
                  {
                  $ppage = $page-1;
                  echo "<a href=\"inbox.php?action=main&amp;page=$ppage&amp;s id=$sid&amp;view=$view$exp\">«Prev</a> ";
                  }
                  if($page<$num_pages)
                  {
                  $npage = $page+1;
                  echo "<a href=\"inbox.php?action=main&amp;page=$npage&amp;s id=$sid&amp;view=$view$exp\">Next»</a>";
                  }
                  echo "
                  $page/$num_pages
                  ";
                  if($num_pages>2)
                  {
                  $rets = "<form action=\"inbox.php\" method=\"get\">";
                  $rets .= "Jump to page: <input name=\"page\" format=\"*N\" size=\"3\"/>
                  ";
                  $rets .= "<input type=\"submit\" value=\"GO\"/>";
                  $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
                  $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
                  $rets .= "<input type=\"hidden\" name=\"view\" value=\"$view\"/>";
                  $rets .= "</form>";
                  echo $rets;
                  }
                  echo "
                  ";
                  echo "</p>";
                  }else{
                  echo "<p align=\"center\">";
                  echo "You have no Private Messages
                  ";
                  echo "<a href=\"inbox.php?action=sendto&amp;sid=$sid\">Send PM</a>
                  ";
                  echo "</p>";
                  }
                  ////// UNTILL HERE >>



                  echo "<p align=\"center\">";

                  $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                  $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id=&#39;".$thid[0]."&#39;"));
                  echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">«Back to Inbox</a>
                  ";
                  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();
                  }

                  else if($action=="readpm")
                  {$pminfo = mysql_fetch_array(mysql_query("SELECT text, byuid, timesent,touid, reported FROM ibwf_private WHERE id=&#39;".$pmid."&#39;"));

                  $ab = getnick_uid($pminfo[1]);

                  addonline(getuid_sid($sid),"Reading PM from $ab","");
                  $pstyle = gettheme($sid);
                  echo xhtmlhead("Read PM",$pstyle);
                  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 = "PM 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 = "PM 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("/faq","<a href=\"lists.php?action=faqs&amp;sid=$sid\">Users Questions</a>", $pmtext);
                  $pmtext = str_replace("/help","<a href=\"help.php?sid=$sid\">Our help menu</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\">

                  ";

                  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 "</select>";
                  echo "<input type=\"submit\" value=\"GO\"/>";
                  echo "</form>
                  ";

                  echo "<form action=\"inbox.php?action=movetofolder&amp;sid=$si d\" method=\"post\">";
                  $uid = getuid_sid($sid);

                  echo "Move To: <select name=\"movetof\">";
                  $foldername = mysql_query("SELECT folderid, foldername FROM ibwf_private_folders WHERE uid=&#39;".$uid."&#39;");
                  while ($items = mysql_fetch_array($foldername))
                  {
                  echo "<option value=\"$items[0]\">".htmlspecialchars($items[1])."</option>";
                  }
                  echo "</select>";
                  echo "<input type=\"hidden\" name=\"pmid\" value=\"$pmid\"/>";
                  echo "<input type=\"submit\" value=\"Move\"/>";
                  echo "</form>";

                  echo "</p>";
                  echo "<p align=\"center\">";
                  echo "

                  <a href=\"inbox.php?action=dialog&amp;sid=$sid&amp;wh o=$pminfo[1]\">Dialog</a>";

                  }else{
                  echo "<img src=\"images/notok.gif\" alt=\"X\"/>This PM ain&#39;t yours";
                  }
                  echo "

                  <a href=\"inbox.php?action=main&amp;sid=$sid\">Back to inbox</a>
                  ";

                  $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                  $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id=&#39;".$thid[0]."&#39;"));
                  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();

                  }

                  else if($action=="crfolder")
                  {
                  addonline(getuid_sid($sid),"Creating Folder","");
                  $pstyle = gettheme($sid);
                  echo xhtmlhead("Create Folder",$pstyle);
                  echo "<p align=\"center\">";

                  echo "<form method=\"post\" action=\"inbox.php?action=crfolderdone&amp;sid=$si d\">";
                  echo "Folder Name: <input name=\"fname\" maxlength=\"25\"/>
                  ";
                  echo "<input type=\"submit\" name=\"Submit\" value=\"Create\"/>";
                  echo "</form>
                  ";


                  $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                  $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id=&#39;".$thid[0]."&#39;"));
                  echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">«Back to Inbox</a>
                  ";
                  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();

                  }

                  else if($action=="crfolderdone")
                  {
                  addonline(getuid_sid($sid),"Creating Folder","");
                  $pstyle = gettheme($sid);
                  echo xhtmlhead("Create Folder",$pstyle);
                  echo "<p align=\"center\">";

                  $fname = $_POST["fname"];
                  $uid = getuid_sid($sid);


                  $reg = mysql_query("INSERT INTO ibwf_private_folders SET uid=&#39;".$uid."&#39;, foldername=&#39;".$fname."&#39;");

                  if($reg)
                  {
                  echo "<img src=\"images/ok.gif\" alt=\"O\"/>Folder Created Successfully

                  ";
                  }else{
                  echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error Creating Folder

                  ";
                  }



                  $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                  $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id=&#39;".$thid[0]."&#39;"));
                  echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">«Back to Inbox</a>
                  ";
                  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();

                  }

                  else if($action=="movetofolder")
                  {
                  addonline(getuid_sid($sid),"Moving PM to Folder","");
                  $pstyle = gettheme($sid);
                  echo xhtmlhead("Moving PM",$pstyle);
                  echo "<p align=\"center\">";

                  $movetof = $_POST["movetof"];
                  $pmid = $_POST["pmid"];

                  $uid = getuid_sid($sid);


                  $str = mysql_query("UPDATE ibwf_private SET folderid=&#39;".$movetof."&#39; WHERE id=&#39;".$pmid."&#39; ");
                  if($str)
                  {
                  echo "<img src=\"images/ok.gif\" alt=\"O\"/>PM moved successfully

                  ";
                  }else{
                  echo "<img src=\"images/notok.gif\" alt=\"X\"/>Can&#39;t move PM at the moment

                  ";
                  }



                  $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                  $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id=&#39;".$thid[0]."&#39;"));
                  echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">«Back to Inbox</a>
                  ";
                  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();

                  }


                  else if($action=="dialog")
                  {
                  addonline(getuid_sid($sid),"Viewing PM Dialog","");
                  $pstyle = gettheme($sid);
                  echo xhtmlhead("PM Dialog",$pstyle);
                  $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 " $tmopm
                  ";

                  echo parsepm($pm[1], $sid);


                  echo "
                  ";
                  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 .= "Jump to page: <input name=\"page\" format=\"*N\" size=\"3\"/>
                  ";
                  $rets .= "<input type=\"submit\" value=\"GO\"/>";
                  $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 .= "</form>";
                  echo $rets;
                  }
                  }else{
                  echo "<p align=\"center\">";
                  echo "NO DATA";
                  }
                  echo "

                  <a href=\"rwdpm.php?action=dlg&amp;sid=$sid&amp;who=$ who\">Download</a>
                  only first 50 messages
                  ";
                  echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">Back to inbox</a>
                  ";
                  $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                  $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id=&#39;".$thid[0]."&#39;"));
                  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();
                  }
                  else{
                  addonline(getuid_sid($sid),"Lost in inbox lol","");
                  $pstyle = gettheme($sid);
                  echo xhtmlhead("Inbox",$pstyle);
                  echo "<p align=\"center\">";
                  echo "I don&#39;t know how did you get into here, but there&#39;s nothing to show

                  ";
                  $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                  $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id=&#39;".$thid[0]."&#39;"));
                  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();
                  }

                  ?>[/b][/quote]

                  click here to join blingywap.co.za
                  http://blingywap.co.za


                  IF YOU NEED HELP JUST ASK AND ALWAYS SAY THANK YOU!

                  Comment


                    #10
                    thanks rko1...but what (database) sql this script?

                    Comment


                      #11
                      Please, any one have this inbox.php on wml code.. Thanks

                      Comment


                        #12
                        Im Have...

                        Comment


                          #13
                          Would you share me? Please..

                          Comment


                            #14
                            Would you give me, please?

                            Comment


                              #15
                              erm..so what im get if give you?

                              Comment

                              Working...
                              X