Help Me Convert

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

    Help Me Convert

    Code:
    else if($action=="renamefolder")
    { 
      addonline(getuid_sid($sid),"Renaming PM Folder - xHTML:v3","");
      echo xhtmlheadnotheme("Renaming PM Folder");
      
      $canrename = "false";
      
      $folderid = $_GET["fid"];
      $foldername = mysql_fetch_array(mysql_query("SELECT foldername, uid FROM ibwf_private_folders WHERE folderid='".$folderid."'"));
      
      if ($foldername[1]==$uid)
      {
        $canrename = "true";
        echo "
    
    <center>";
        echo "Renaming Folder: [i][b]$foldername[0][/b][/i]
    
    ";
        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 "</center></p>";
      }else{
             echo "<p align=\"center\">";
             echo "This is not Your Folder!";
             echo "</p>";
           }
      
      echo "
    
    [size="1"]";
      echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
      echo " > ";
      echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>";
      echo " > ";
      if ($canrename=="true")
      {
        echo "<a href=\"inbox.php?action=folder&amp;folderid=$folderid&amp;sid=$sid\">$foldername[0]</a>";
      }else{
             echo "ERROR";
           }
      echo " > ";
      echo "Renaming Folder";
      echo "[/size]</p>";  
    
      echo xhtmlfoot();
    }
    
    
    ////////////////////////////////////////RENAME FOLDER - DONE
    else if($action=="rnamefdone")
    {
      addonline(getuid_sid($sid),"Renaming PM Folder - xHTML:v3","");
      echo xhtmlheadnotheme("Renaming PM Folder");
      
      $folderid = $_POST["fid"];
      $newname = $_POST["newname"];
      
      $res = mysql_query("UPDATE ibwf_private_folders SET foldername=&#39;".$newname."&#39; WHERE folderid=&#39;".$folderid."&#39;");
      
      echo "<p align=\"center\">";
       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 "</p>";        
            
      echo "
    
    [size="1"]";
      echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
      echo " > ";
      echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>";
      echo " > ";
      echo "<a href=\"inbox.php?action=folder&amp;folderid=$folderid&amp;sid=$sid\">$newname</a>";
      echo " > ";
      echo "Folder Renamed";
      echo "[/size]</p>";  
    
      echo xhtmlfoot();
    }
    
    
    ////////////////////////////////////////DELETE FOLDER
    else if($action=="delfolder")
    {  
      addonline(getuid_sid($sid),"Deleting PM Folder - xHTML:v3","");
      echo xhtmlheadnotheme("Deleting PM Folder");
      
      $folderid = $_GET["fid"];
      $foldername = mysql_fetch_array(mysql_query("SELECT foldername, uid FROM ibwf_private_folders WHERE folderid=&#39;".$folderid."&#39;"));
      
      if ($foldername[1]==$uid)
      {
        echo "<p align=\"center\">";
         $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 "</p>";
       }else{
              echo "<p align=\"center\">";
              echo "This is not Your Folder!";
              echo "</p>";
               }
      
      echo "
    
    [size="1"]";
      echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
      echo " > ";
      echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>";
      echo " > ";
      echo "$foldername[0]";
      echo " > ";
      echo "Deleted";
      echo "[/size]</p>";  
    
      echo xhtmlfoot();
    }
    else if($action=="readpm")
    {
      addonline(getuid_sid($sid),"Reading PM - xHTML:v3","");
      $pstyle = theme($sid);
      echo xhtmlhead("Read PM",$pstyle);
    
      $pminfo = mysql_fetch_array(mysql_query("SELECT text, byuid, timesent, touid, reported, title 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>";
        
      }
      
      $tmstamp = $pminfo[2];
      $tmdt = date("d/m/Y - H:i:s", $tmstamp);
      
        echo "<div class=\"HTAB\" style=\"background:#FFFFFF\">";  
     
              echo "<div>";    
            echo "$blueh";
                echo "$ptxt $bylnk
    Subject: [size="1"]$pminfo[5][/size]
    [size="1"]<font color=\"#ffffff\">$tmdt</font>[/size]</div>";
            echo "$blueb";
                echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"169\">";
                    echo "<tr>";
                        echo "<td class=\"IL-R\"><font color=\"#000000\">";
                            $pmtext = parsepm($pminfo[0], $sid);
                            $pmtext = str_replace("/faq","<a href=\"lists.php?action=faqs&amp;sid=$sid\"><font color=\"#ffffff\">Users Questions</font></a>", $pmtext);
                            $pmtext = str_replace("/help","<a href=\"help.php?sid=$sid\"><font color=\"#ffffff\">Our help menu</font></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 "</font></td>";
                    echo "</tr>";
                echo "</table>";
            echo "</div>";
            echo "</div>";  
      
      echo "
    
    <center>"; 
      
      echo "<form action=\"inbxproc.php?action=proc&amp;sid=$sid\" method=\"post\">";
      echo "[size="1"]Action[/size]<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\" value=\"GO\"/>";
      echo "</form>";
      
    $nof = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private_folders WHERE uid=&#39;".$uid."&#39;"));
    if ($nof[0]>=1){
      echo "<form action=\"inbox.php?action=movetofolder&amp;sid=$sid\" method=\"post\">";
      $uid = getuid_sid($sid);    
      echo "[size="1"]Move To[/size]<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 "<a href=\"inbox.php?action=dialog&amp;sid=$sid&amp;who=$pminfo[1]\">Dialog</a>";
     
      }else{
        echo "<img src=\"images/notok.gif\" alt=\"X\"/>This PM ain&#39;t yours";
      }      
      
      echo "</center></p>"; 
      
      
      echo "
    
    [size="1"]";
      echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
      echo " > ";
      echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>";
      echo " > ";
      echo "Reading PM";
      echo "[/size]</p>";  
      
      echo xhtmlfoot();
    }
    Thank you very much Coder

    #2
    just use my script already converted lol









    Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
    Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free

    Comment


      #3
      complete script in methos inbox
      Attached Files

      Comment

      Working...
      X