Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's RavenNuke(tm) v2.02.02 Distro
Author Message
tweaker
Regular
Regular


Joined: Jan 20, 2006
Posts: 84

PostPosted: Fri Jun 02, 2006 4:37 pm Reply with quote

I've setup a client for banner advertisements on our website. I've given him a Username and Password and he gets the following error:

Fatal error: Call to undefined function: filter() in /var/www/html/html/modules/Advertising/index.php on line 305

The function for this code is as follows:

Code:


function client_valid($login, $pass) {
   global $prefix, $db, $module_name, $sitename;
   $login = filter($login, "nohtml");   <------ line 305
   $login = filter($pass, "nohtml");
   $numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner_clients WHERE login='$login' AND passwd='$pass'"));
   if ($numrows != 1) {
      include("header.php");
      title("$sitename: "._ADSYSTEM."");
      OpenTable();
      echo "<center>"._LOGININCORRECT."<br><br>"._GOBACK."</center>";
      CloseTable();
      themenu();
      include("footer.php");
      die();
   } else {
      $row = $db->sql_fetchrow($db->sql_query("SELECT cid FROM ".$prefix."_banner_clients WHERE login='$login' AND passwd='$pass'"));
      $cid = $row['cid'];
      $info = base64_encode("$cid:$login:$pass");
      setcookie("client","$info",time()+3600);
      Header("Location: modules.php?name=$module_name&op=client_home");
   }
}


Any idea why he can't get through?
 
View user's profile Send private message Visit poster's website Yahoo Messenger ICQ Number
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9453
Location: Arizona

PostPosted: Fri Jun 02, 2006 8:36 pm Reply with quote

I will PM Evaders99 on this one. I have a feeling this is a carry-over from some 7.8 code... hang tight for a "few"...

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
tweaker
PostPosted: Sat Jun 03, 2006 3:16 am Reply with quote

I'm using rnv2.02.02 according to my notes.

Here's the funny thing.

In IE 6, you can't see it.
IE 7, you can.
FireFox, you can.

Hope this helps.
 
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6793
Location: Ha Noi, Viet Nam

PostPosted: Sat Jun 03, 2006 4:42 am Reply with quote

RN v2.02.02 does not have a module called Advertising in it so I would concur with Montego that this is some left of code from a previous installation or a module you have added after installing RN.

In the event this is a module you installed after installing RN you may want to double check all files were uploaded - at least until Evaders can offer some feedback.

The function filter() resides in mainfile.php on phpnuke v7.8+ but is not present in RN because it is not required.
 
View user's profile Send private message Send e-mail
tweaker
PostPosted: Sat Jun 03, 2006 6:07 am Reply with quote

So the best thing I can do (which works great BTW) is use the block-Advertisement and put the banners in it rather than the "Normal". It's the Normal that doesn't work afterall (Hmmp, go figure on the normal).
 
Guardian2003
PostPosted: Sat Jun 03, 2006 7:36 am Reply with quote

You should be able to use the Banners module that came with RN.
FB dropped the Banners module in phpNuke 7.8+ and replaced it with the Advetising module (which has bugs).
 
montego
PostPosted: Sat Jun 03, 2006 7:43 am Reply with quote

My concern is really that I thought the filter function did not come in until the later nukes. That is what I have asked Evaders99 about, because I see it in the RN code... Sad
 
Guardian2003
PostPosted: Sat Jun 03, 2006 8:09 am Reply with quote

You had me worried then M.
You are correct in that in mainfile.php RN uses function filter_text()
but nuke 7.8+ seems to use both function filter_text() and function filter()
 
tweaker
PostPosted: Sat Jun 03, 2006 8:32 am Reply with quote

So how come it works in IE7 and FireFox but not IE6 then? I'm not getting outta RN at any time. I love his distro and he knows his stuff. Plus the suppose staff like yourself and montego are incredibly generous with your time to help people like myself out figuring problems like this out.
 
montego
PostPosted: Sat Jun 03, 2006 8:35 am Reply with quote

Quote:

So how come it works in IE7 and FireFox but not IE6 then?


That is a good point! We'd have to see how function client_valid is getting called, but unfortunately I have to dash off in a few minutes and won't be able to get back until the morning...
 
tweaker
PostPosted: Sat Jun 03, 2006 8:39 am Reply with quote

No problem. Have a safe trip.
 
Guardian2003
PostPosted: Sat Jun 03, 2006 9:40 am Reply with quote

I don't have an answer for the IE7/FF v IE6 problem but assume that is down to some code error - Advertising module had additional functionality for handling flash I believe so it may possible be lated - just guessing.
 
tweaker
PostPosted: Sat Jun 03, 2006 10:05 am Reply with quote

But line 305 has nothing to do with flash, it's that function routeen you said that doesn't present itself until 7.8.

Now I did start out with 7.9, heard there were tooooo many issues and everyone was going with rn so I converted. Should Advertisement just be removed then?
 
Guardian2003
PostPosted: Sat Jun 03, 2006 10:35 am Reply with quote

That is your decision. You caould add the extra function into mainfile but the safest thing would be to remove it and use the Banners module for now - or there are alternative modules you could use.

The chances are that the Advertising module may use different sql tables which you no longer have in any event but you would need to check that.
 
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Sat Jul 08, 2006 1:31 am Reply with quote

Not sure where this is coming from... did the Patched files have this bug in it?

filter() should not be used in 7.8 at all

Change to
Code:


   $login = check_html($login, "nohtml");   
   $pass = check_html($pass, "nohtml");

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Guardian2003
PostPosted: Sat Jul 08, 2006 5:11 am Reply with quote

Then I must have been in error. I only have a copy of 7.9 on my PC now and that has the function in it.
I suspect the issue is with 'downgrading' from 7.9 without wiping the files of the server first i.e. as RN does not use the Advertising module the files are still on the server (but the table may have gone or are of a diffeent structure to the banners module table).
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's RavenNuke(tm) v2.02.02 Distro

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©