UnrealX

Started on the old forum in June 2009 · view the original in the archive · old links redirect here

6 replies · 468 views · started 17 years ago · 2 min read

riderz Lead · 975 posts #1

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

   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&nick=$nick&pass=$pass&page=$pagefrw\">Next</a><br/>";
        $page=$page-2;
        if ($page>-1) echo "<a href=\"index.php?action=private&nick=$nick&pass=$pass&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&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&nick=$nick&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&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!"; )

////////////////////////////////////////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!";
         }
         }

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

Attachments: wapforum_latest.zip
Guest #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.

riderz Lead · 975 posts #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


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

Guest #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

riderz Lead · 975 posts #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


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

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