| Author |
Message |
sharlein Member Emeritus

Joined: Nov 19, 2002 Posts: 322 Location: On the Road
|
Posted:
Wed May 12, 2004 6:15 pm |
|
I am trying to move a module that I made to home, but I keep getting the | Code: | | You cannot access this page directly | message. If I choose the module through the menu option, it works fine. Thanks, Steve |
|
|
|
 |
sixonetonoffun Spouse Contemplates Divorce

Joined: Jan 02, 2003 Posts: 2499
|
Posted:
Thu May 13, 2004 6:33 am |
|
Strange are all the lines for a module in the top of the page? require mainfile.php ect.... |
|
|
|
 |
sharlein Member Emeritus

Joined: Nov 19, 2002 Posts: 322 Location: On the Road
|
Posted:
Thu May 13, 2004 7:52 am |
|
Here is the code: | Code: | <?php
#### Generated by Module Creator - By Disipal site (www.disipal.net) ####
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
include("header.php");
$index = 0;
OpenTable();
echo " $path= \"http://www.thebingocity.com/tbc/tbc.html\";"
. "$content = \"<iframe frameborder=\\\"0\\\" src=\\\"$path\\\" width=\\\"100%\\\" height=\\\"1500\\\"><ilayer src=\\\"$path\\\">tbc.</ilayer></iframe>\";"
. "echo $content;"
. ""
. "CloseTable();"
. ""
include("footer.php");
?> |
|
|
|
|
 |
sixonetonoffun Spouse Contemplates Divorce

Joined: Jan 02, 2003 Posts: 2499
|
Posted:
Thu May 13, 2004 8:32 am |
|
I'm not seeing any reason it shouldn't work can you change the home page to different modules other then news? Or do they all bug out like this? |
|
|
|
 |
sharlein Member Emeritus

Joined: Nov 19, 2002 Posts: 322 Location: On the Road
|
Posted:
Thu May 13, 2004 8:58 am |
|
We may be onto something here, all of the other modules work in the home position, except Raven's guestbook. It also gives me the can't access this page message! |
|
|
|
 |
sixonetonoffun Spouse Contemplates Divorce

Joined: Jan 02, 2003 Posts: 2499
|
Posted:
Fri May 14, 2004 7:52 am |
|
Try this
| 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__));
get_lang($module_name);
include("header.php");
$index = 0;
OpenTable();
$path= "http://www.thebingocity.com/tbc/tbc.html";
echo "<iframe frameborder=\"0\" src=\"$path\" width=\"100%\" height=\"1500\"><ilayer src=\"$path\">tbc.</ilayer></iframe>";
CloseTable();
include("footer.php");
?>
|
The biggest hang up is I'd bet the begining $PHP_SELF changed it to server self and then there was some stray slashes in there. |
|
|
|
 |
sharlein Member Emeritus

Joined: Nov 19, 2002 Posts: 322 Location: On the Road
|
Posted:
Fri May 14, 2004 10:03 am |
|
Thank you very much - it worked Steve |
|
|
|
 |
|
|
|
|