UnrealX

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

    UnrealX

    Who can help me im getting these errors in index and core

    Parse error: syntax error, unexpected T_PRIVATE in /home/waplive/public_html/test/wapforum/wapforum_latest/wapforum_latest/index.php on line 574

    here are the one line (echo private($nick,$pass,$page); )
    Code:
       if ($action=="private")
             {
             //Inbox
            echo "<card id=\"viewforum\" title=\"Inbox\">";
            echo "<p align=\"center\">";
            $pmtot=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM private WHERE sentto='".strtolower($nick)."'"));
            $pmtot[0]=$pmtot[0]-1;
            $pmtot=ceil($pmtot[0]/5);
            echo login($nick,$pass);
            echo "<br/>";
            if ($logged)
                      {
            echo private($nick,$pass,$page);
            echo "<br/>";
            $pagefrw=$page+1;
            $pagepws=$page-1;
            if ($page<$pmtot+1) echo "<a href=\"index.php?action=private&amp;nick=$nick&amp;pass=$pass&amp;page=$pagefrw\">Next</a><br/>";
            $page=$page-2;
            if ($page>-1) echo "<a href=\"index.php?action=private&amp;nick=$nick&amp;pass=$pass&amp;page=$pagepws\">Prev</a><br/>";
            $page=$page+2;
            $pmtot=$pmtot+1;
           // if ($pmtot==0) $pmtot=1;
            echo "Page: $page/$pmtot";
            echo "<br/>";
            echo "<a href=\"delall.php?nick=$nick&amp;pass=$pass\">Delete All</a><br/>";
            echo "Send PM to: <input name=\"kam\" value=\"\"/><br/>";
            echo "<anchor title=\"Send!\">Send!";
            echo "<go href=\"index.php?action=sendpmcst&amp;nick=$nick&amp;pass=$pass\" method=\"post\">";
            echo "<postfield name=\"who\" value=\"\$kam\"/>";
            echo "</go>";
            echo "</anchor>";
                      } else echo "Please login before accessing your Inbox!";
            echo "<br/><a href=\"index.php?nick=$nick&amp;pass=$pass\"><img src=\"./images/home.gif\" alt=\"*\"/>Forum Home</a><br/>";
            echo "</p>";
            echo "</card>";
                                               }
    Parse error: syntax error, unexpected T_PRIVATE in /home/waplive/public_html/test/wapforum/wapforum_latest/wapforum_latest/core.php on line 599

    here are the other line (} else echo "Login before sending PMs!"; )
    Code:
    ////////////////////////////////////////Send PM//////////////////////////////
    function sendpm($nick,$pass,$who,$ttextas)
             {
              global $logged;
              $valandos=date("H")+$timezone;
            if ($valandos>23) $valandos=$valandos-24;
            $data=date("y m d - ".$valandos.":i:s");
            $lastpostt=mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM private WHERE sentby='".$nick."'"));
                  global $pmantiflood;
                 if (time() < $lastpostt[0]+$pmantiflood) {echo "PM was NOT sent!";} else
                 {
              //$ttextas=str_replace("$","$$",$ttextas);
              echo login($nick,$pass);
              echo "<br/>";
              if ($logged) {
              $artoxyra=mysql_fetch_array(mysql_query("SELECT name FROM users WHERE name='".$who."'"));
              if ($artoxyra[0]) {
              $pmsent=mysql_query("INSERT INTO private SET unread='y', sentby='".$nick."', sentto='".$who."', text='".$ttextas."', date='".$data."', timesent='".time()."'");
              if ($pmsent) {echo "PersonalMessage sent successfully!<br/>";
              $ttextas=parsebb($ttextas);
              $ttextas=htmlspecialchars($ttextas);
                         $rparsedtxtas=reparsebb($ttextas);
                         echo $rparsedtxtas;} else echo "Problems!";} else echo "Member does not exist!";
             } else echo "Login before sending PMs!";
             }
             }
    Attached Files
    Last edited by riderz; 14.06.09, 18:10.

    #2
    As I feel word private is reserved word of PHP and u cannot make function of it, so do 2 things in your coding and than test it.
    1st: in core.php find function private() and replace da name of private into pvt()
    2nd: in index.php goto if($action == "private") than change same function name as above of function private here. than test it, hope it will work fine.

    Comment


      #3
      still get this error

      Parse error: syntax error, unexpected T_PRIVATE in /home/waplive/public_html/test/wapforum/wapforum_latest/wapforum_latest/index.php on line 574

      Comment


        #4
        did u change private function from core.php ?? and than change same function index.php on line 547...... coz I downloaded ur script and did same as I said here and all issue gone away

        Comment


          #5
          can u please upload ur file that u changed please if u dnt mind ill change it now if it not work then ill add ur file

          Comment


            #6
            chk file what I uploaded for u.........
            Attached Files

            Comment


              #7
              Tanx it work 100% now
              Last edited by riderz; 14.06.09, 21:49.

              Comment

              Working...
              X