03moscropl
Flash Freak
- Messages
- 698
- Reaction score
- 0
- Points
- 16
i have a proplem with a script i modified for phpnuke rather that post nuke it comes up put in the module postion it shows.
here is the phpfile
Code:
[b]Warning[/b]: opendir(modules//games): failed to open dir: No such file or directory in [b]/home/igamer/public_html/site/modules/MiniClip_Games/index.php[/b] on line [b]23[/b]
[b]Warning[/b]: readdir(): supplied argument is not a valid Directory resource in [b]/home/igamer/public_html/site/modules/MiniClip_Games/index.php[/b] on line [b]24[/b]
[b]Warning[/b]: closedir(): supplied argument is not a valid Directory resource in [b]/home/igamer/public_html/site/modules/MiniClip_Games/index.php[/b] on line [b]29[/b]
here is the phpfile
PHP:
<?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__));
$pagetitle = "mini clip games";
$modimagefolder = "modules/$ModName/images";
$modgamefolder = "modules/$ModName/games";
// Set $index = 1 to enable right column
$index = 0;
function menu() {
global $modimagefolder, $modgamefolder, $ModName;
include("header.php");
OpenTable();
$dh = opendir($modgamefolder);
while ($dir = readdir($dh)) {
if (!is_dir("modules/".$dir) && ($dir != '.') && ($dir != '..')) {
echo " <a href=\"modules.php?op=modload&name=$ModName&file=index&game=$dir&func=playgame\"><img src=\"$modgamefolder/$dir/$dir.gif\" height=\"70\" border=\"0\"></a> ";
}
}
closedir($dh);
echo "</td></tr><tr><td align=\"center\"><a href=\"modules.php?op=modload&name=$ModName&file=index&func=credits\">"._MINICLIPGAMESMESSAGE."</a>";
CloseTable();
include("footer.php");
}
function playgame() {
global $modgamefolder, $game, $ModName;
include("header.php");
OpenTable();
echo "<a href=\"modules.php?op=modload&name=$ModName&file=index\">Game Index</a> :: $game"
."</td></tr><tr><td align=\"center\">"
."<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" width=\"550\" height=\"360\">\n"
."<param name=\"movie\" value=\"$modgamefolder/$game/$game.swf\">"
."<param name=\"quality\" value=\"high\">"
."<embed src=\"$modgamefolder/$game/$game.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"550\" height=\"360\">\n"
."</embed>\n"
."</object>"
."</td></tr><tr><td align=\"center\"><a href=\"modules.php?op=modload&name=$ModName&file=index&func=credits\">"._MINICLIPGAMESMESSAGE."</a>";
CloseTable();
include("footer.php");
}
function modcredits() {
include("header.php");
OpenTable();
echo "<p align=\"center\"><br>This module is brought to you by <a href=\"mailto:burke@dimensionquest.net\">Burke</a> @ <a href=\"http://www.dimensionquest.net\">dimensionquest.net</a>!<br><br>"
."These games are provided as \"Free games for your website\" by <a href=\"http://www.miniclip.com\">Miniclip.com</a><br><br>"
."Miniclip files were only renamed in the making of this module to provide naming consistancy between Folder/Flash/Image filenames</p><br>";
CloseTable();
include("footer.php");
}
switch($func) {
default:
menu();
break;
case "playgame":
playgame();
break;
case "credits";
modcredits();
break;
}
?>