Inbox reply error

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

    Inbox reply error

    Hey guys anyone can please look at this when i send new pm it works 100% but when i send a reply it just send blank msg

    Code:
       $whonick = getnick_uid($pminfo[1]);
          
          $title = "$pminfo[4]";
          $title = str_replace("RE: ","", $title);
          $titlereply = "RE: $title";  
      
    	  echo "Send PM to <i><b>$whonick</b></i><br/><br/>";  
    	  echo "<form action=\"../inbox/readpm.php?action=sendpm&amp;who=$pminfo[1]&amp;sid=$sid\" method=\"post\">";
    	  echo "Subject:<br/><input name=\"pmtitle\" maxlength=\"50\" value=\"$titlereply\" /><br/>";
    	  echo "Message:<br/><input name=\"pmtext\" maxlength=\"500\"/><br/>";
    	  echo "<input type=\"submit\" value=\"Send\"/>";
    	  echo "</form>";
    Code:
    ////////////////////////////////////////SEND PM
    else if($action=="sendpm")
    {
      addonline(getuid_sid($sid),"Sending PM - xHTML:v3","");
     
      echo "<p align=\"center\">";    
      
      $whonick = getnick_uid($who);
      $byuid = getuid_sid($sid);
      $tm = time();
      $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM redo_private WHERE byuid='".$byuid."'"));
      $pmfl = $lastpm[0]+getpmaf();
      if($byuid==1)$pmfl=0;
      if($pmfl<$tm)
      {
        if(!isblocked($pmtext,$byuid))
        {
        if((!isignored($byuid, $who))&&(!istrashed($byuid)))
        {
      $res = mysql_query("INSERT INTO redo_private SET text='".$pmtext."', title='".$pmtitle."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'");
      }else{
        $res = true;
      }
      if($res)
      {
    
        echo "<img src=\"../images/ok.gif\" alt=\"O\"/>";
        echo "PM was sent successfully to <b>$whonick</b><br/><br/>";
        echo "<b>Subject:</b> $pmtitle<br/>";
        $message = parsepm($pmtext, $sid);
        echo "<b>Message:</b> $message";
        
      }else{
        echo "<img src=\"../images/notok.gif\" alt=\"X\"/>";
        echo "Can't Send PM to <b>$whonick</b><br/><br/>";
      }
      }else{
        $bantime = time() + (7*24*60*60) ;
        echo "<img src=\"../images/notok.gif\" alt=\"X\"/>";
        echo "Can't Send PM to <b>$whonick</b><br/><br/>";
        echo "You just sent a link to one of the crapiest sites on earth<br/> The members of these sites spam here a lot, so go to that site and stay there if you don't like it here<br/> as a result of your stupid action:<br/>1. you have lost your sheild<br/>2. You are BANNED!";
        mysql_query("INSERT INTO redo_metpenaltiespl SET uid='".$byuid."', penalty='1', exid='1', timeto='".$bantime."', pnreas='Banned: Automatic Ban for spamming for a crap site'");
        mysql_query("UPDATE redo_users SET shield='0' WHERE id='".$byuid."'");
        mysql_query("INSERT INTO redo_private SET text='".$pmtext."', byuid='".$byuid."', touid='1', timesent='".$tm."'");
      }
      }else{
        $rema = $pmfl - $tm;
        echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
        echo "Flood control: $rema Seconds<br/>";
      }
      
      echo "</p>";
      
      echo "<p>";
      echo "<a href=\"../home/index.php?action=main&amp;sid=$sid\">Home</a>";
      echo " &#62; ";
      echo "<a href=\"../inbox/index.php?action=main&amp;sid=$sid\">Inbox</a>";
      echo " &#62; ";
      echo "Sending PM";
      echo "</p>";  
    
      
    }
    i dont know if ive mis something in here
    ________________
    Jacques
    jacques@gw-designs.co.za
    http://coding.biz.tm
    Come join and lets make it a place to learn all the noobies how to code
    __________________

    NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

    #2
    Where is _POST $pmtext?
    And input type in form is missing.
    <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

    Comment


      #3
      hey arange tanx so much ive never added

      Code:
      $pmtext = $_POST["pmtext"];
      $pmtitle = $_POST["pmtitle"];
      ________________
      Jacques
      jacques@gw-designs.co.za
      http://coding.biz.tm
      Come join and lets make it a place to learn all the noobies how to code
      __________________

      NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

      Comment


        #4
        re

        if u want the code to make the chatbot send and recieve pms let me know its an easy mod lol and it doesnt interfere with user pms









        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


          #5
          yea sure u can code that script
          ________________
          Jacques
          jacques@gw-designs.co.za
          http://coding.biz.tm
          Come join and lets make it a place to learn all the noobies how to code
          __________________

          NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

          Comment


            #6
            Originally posted by riderz View Post
            hey arange tanx so much ive never added

            Code:
            $pmtext = $_POST["pmtext"];
            $pmtitle = $_POST["pmtitle"];
            You're welcome.

            Just don't add it like that, add like this instead,

            PHP Code:
            $pmtext = isset($_POST["pmtext"]) ? $_POST["pmtext"] : ''
            ... or,

            PHP Code:
            if (isset($_POST["pmtext"])) { 

            $pmtext $_POST["pmtext"]; 

            } else { 

            $pmtext ''


            <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

            Comment

            Working...
            X