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