PDA

View Full Version : help with a parse error


clamcrusher
07-29-2003, 02:17 PM
i installed the away message hack and it works. 1 problem i have though is when i go into admin cp and try and find, edit or look up users, i get this error when i click find user etc...

here is the error:

Parse error: parse error, unexpected '{' in /usr/local/psa/home/vhosts/chemical-conversions.com/httpdocs/admin/user.php on line 1733

i tried uninstalling the hacks on user.php and nothing changed, just now the error is on line 1733 instead of line 1746(cause i removed lines from removing the hack code)
here is the code where it sais the error, line 1733 is the line that sais: if ($orderby=="") {

seems to me like a simple fix for those who know php, unfortunately im not versed in writing it.


(btw my real code doesnt have those underscores at the begining of each line, that happened when i cut and pasted it here for some reason, those are blank spaces in my real code)

// ###################### Start findaway #######################
if ($action=="findaway") {
__if ($orderby=="") {
____$orderby="awaydate";
__}
__if ($limitstart=="") {
____$limitstart=0;
__} else {
____$limitstart--;
__}
__if ($limitnumber=="") {
____$limitnumber=99999999;
__}
__$users=$DB_site->query("SELECT user.userid,username,FROM_UNIXTIME(awaydate) AS awaydate,returndate,awayreason,away FROM user WHERE away = 1 ORDER BY $orderby $direction LIMIT $limitstart,$limitnumber");
__$countusers=$DB_site->query_first("SELECT COUNT(*) AS users FROM user WHERE away=1");
__$limitfinish=$limitstart+$limitnumber;

Logician
07-31-2003, 10:13 AM
as error mentions your closing crackets (}) does not match your openning brackets ({).

Your either go count/match each of them in your code which is not an easy job for a novice or replace your file with a unhacked file, then reapply your hacks in that file. This time carefully. ;)

clamcrusher
08-01-2003, 02:15 AM
thx bud. fixed it :)