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 -> phpnuke 7.1
Author Message
southern
Client



Joined: Jan 29, 2004
Posts: 624

PostPosted: Wed Nov 17, 2004 10:12 pm Reply with quote

I need to know some code and which file to put it in so I as admin can put anything I want on my own site w/o encountering the 'That html is not allowed' page. Somewhere on this forum I came across this code
Code:


if (!is_admin($admin)) {

that was supposed to go into mainfile.php but when I put it in I got a blank page. Ideas, anyone?
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Thu Nov 18, 2004 12:32 am Reply with quote

It is mainfile.php. Did you remember to add the closing }?
Code:
if (!is_admin($admin)) {

   foreach ($_GET as $secvalue) {
      if ((eregi("<[^>]*script*\"?[^>]*>", $secvalue)) ||
      (eregi("<[^>]*object*\"?[^>]*>", $secvalue)) ||
      (eregi("<[^>]*iframe*\"?[^>]*>", $secvalue)) ||
      (eregi("<[^>]*applet*\"?[^>]*>", $secvalue)) ||
      (eregi("<[^>]*meta*\"?[^>]*>", $secvalue)) ||
      (eregi("<[^>]*style*\"?[^>]*>", $secvalue)) ||
      (eregi("<[^>]*form*\"?[^>]*>", $secvalue)) ||
      (eregi("\([^>]*\"?[^)]*\)", $secvalue)) ||
      (eregi("\"", $secvalue))) {
      die ("<center><img src=images/logo.gif><br><br><b>The html tags you attempted to use are not allowed</b><br><br>[ <a href=\"javascript:history.go(-1)\"><b>Go Back</b></a> ]");
      }
   }

   foreach ($_POST as $secvalue) {
      if ((eregi("<[^>]script*\"?[^>]*>", $secvalue)) ||   (eregi("<[^>]style*\"?[^>]*>", $secvalue))) {
         die ("<center><img src=images/logo.gif><br><br><b>The html tags you attempted to use are not allowed</b><br><br>[ <a href=\"javascript:history.go(-1)\"><b>Go Back</b></a> ]");
      }
   }
}
 
View user's profile Send private message
southern







PostPosted: Fri Aug 25, 2006 8:28 pm Reply with quote

I got it working, finally lol Sorry for the late answer. Smile
 
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Mon Aug 28, 2006 11:04 am Reply with quote

LOL just late? Unless I'm reading dates wrong, its almost 2 years now hehe

_________________
- 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
southern







PostPosted: Mon Aug 28, 2006 12:44 pm Reply with quote

The dates are correct, my sense of time is not. Wink
 
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 -> phpnuke 7.1

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 ©