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.3
Author Message
dobbelina
Hangin' Around



Joined: Jul 21, 2004
Posts: 47

PostPosted: Wed Jul 21, 2004 1:03 am Reply with quote

Hi !
I'm trying to put a module with simple html in "home" cause i want only
registered users to access the "news" module.
(as you know the home module is public).
But when doing this i get a "You can't access this file directly..." message ?
It's strange cause the "original" modules (like downloads,feedback etc)
works fine.
Here's the code from index.php of my html module:
Code:
<?php 

if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    die ("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
$index = 0;

function index() {
include("header.php");
OpenTable();
echo"<body bgcolor=\"#CCCCCC\">"
  . ""
  . "<p><FONT class=option><B>Welcome to linkking's portal !</p>"
  . "<p>we are the best !</B></FONT></p>";
CloseTable();
include("footer.php");
}


switch ($op) {

    default:
    index();
    break;

    }
?>

I have nuke v7.3 +2.5 patch installed.
I have also tried both the "CWC_CoverPage1.1" and the
"CZIframe" module.But get's the same error message when trying to put it in home
Please can someone help me with this one !
Many thanks
Dobbelina Very Happy
 
View user's profile Send private message
sixonetonoffun
Spouse Contemplates Divorce



Joined: Jan 02, 2003
Posts: 2496

PostPosted: Wed Jul 21, 2004 10:27 am Reply with quote

Try this instead.
Code:


if (!eregi("modules.php", $_SERVER['SCRIPT_NAME'])) {
        die ("You can't access this file directly...");
    }


This is to be compliant with the 2.5 patch file updates.

_________________
[b][size=5]openSUSE 11.4-x86 | Linux 2.6.37.1-1.2desktop i686 | KDE: 4.6.41>=4.7 | XFCE 4.8 | AMD Athlon(tm) XP 3000+ | MSI K7N2 Delta-L | 3GB Black Diamond DDR
| GeForce 6200@433Mhz 512MB | Xorg 1.9.3 | NVIDIA 270.30[/size:2b8 
View user's profile Send private message
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.3

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 ©