case.php gives whitescreen!

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   case.php gives whitescreen!
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 42
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
Can someone smarter than me tell me what I am doing wrong?

<?php
if ( !defined('ADMIN_FILE') )
{
   die ("Access Denied");
}

$module_name = "League_records";
switch ($op)
{
  case "LRgames" :
  case "LRleagues" :
  case "LRmatches" :
  include("modules/$module_name/admin/index.php");
  break;
}
?>


As compared to this which works fine

<?php
if ( !defined('ADMIN_FILE') )
{
   die ("Access Denied");
}

$module_name = "League_records";
//switch ($op)
//{
//  case "LRgames" :
//  case "LRleagues" :
//  case "LRmatches" :
  include("modules/$module_name/admin/index.php");
//  break;
//}
?>



Back to top Reply with quote
#2   re: case.php gives whitescreen!
rlgnak
CZ Super Newbie
rlgnak has been a member for over 19 year's 19 Year Member
usa.gif alaska.gif
Occupation: College
Gender: Male
Status: Offline
Joined: Jun 22, 2004
0.01 posts per day
Posts: 62
Points: 3,367
   
add die($op); at the end before ?> and see what it says so you can see if your getting the right cases or any cases at all




_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
#3   re: case.php gives whitescreen!
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 42
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
All it says now is

League_records


This is my code in my admin/index.php

switch($op) {

   case "LRgames":
   break;
   
   case "LRleagues":
   break;
   
   case "LRmatches":
   break;

}


I went with something simple till I get it working. I have been playing with it so long I don't know where I began.


Back to top Reply with quote
#4   re: case.php gives whitescreen!
rlgnak
CZ Super Newbie
rlgnak has been a member for over 19 year's 19 Year Member
usa.gif alaska.gif
Occupation: College
Gender: Male
Status: Offline
Joined: Jun 22, 2004
0.01 posts per day
Posts: 62
Points: 3,367
   
god this is hard to explain i feel sorry for techers .. ummm maybe someone else can explain cuz im having issues




_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
#5   re: case.php gives whitescreen!
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 42
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
o, I remember what I was trying to do.

Here is the admin index.php

<?php
if ( !defined('ADMIN_FILE') )
{
   die ("Access Denied");
}
if (!defined('NUKE_MODULES_DIR')) {
  define('NUKE_MODULES_DIR', "modules/" );
}
global $prefix, $db, $admin_file;
$aid = substr("$aid", 0,25);
$row = $db->sql_fetchrow($db->sql_query("SELECT title, admins FROM ".$prefix."_modules WHERE title='Encyclopedia'"));
$row2 = $db->sql_fetchrow($db->sql_query("SELECT name, radminsuper FROM ".$prefix."_authors WHERE aid='$aid'"));
$admins = explode(",", $row['admins']);
$auth_user = 0;
for ($i=0; $i < sizeof($admins); $i++) {
    if ($row2['name'] == "$admins[$i]" AND !empty($row['admins'])) {
        $auth_user = 1;   
    }
}

if ($row2['radminsuper'] == 1 || $auth_user == 1) {
get_lang($module_name);
include("header.php");
$index = 0;
global $db, $prefix, $admin_file, $op;
$module_name = basename(dirname(dirname(__FILE__)));
GraphicAdmin();
include(NUKE_MODULES_DIR.$module_name."/admin/nav.php");
OpenTable();
echo "<strong>Games</strong><hr>";
echo "<table align="center" width="100%" border="1"><tr>";
echo "<tr><td><strong>Short</strong></td><td><strong>Fullname</strong></td><td><strong>Version</strong></td><td><strong>Action</strong></td></tr>";
$result = $db->sql_query("SELECT gid, gname, version, gabbr FROM ".$prefix."_league_games ORDER by gid");
while (list($gid, $gname, $version, $gabbr)=sql_fetch_row($result)) {
echo "<tr><td>$gabbr</td><td>$gname</td><td>$version</td>";
echo "<td>(<a href='modules.php?name=$modulename&file=egame&gid=$gid'>Edit</a>&nbsp;-&nbsp;<a href='modules.php?name=$modulename&file=dgame&gid=$gid'>Delete</a>)</td></tr>";
}
echo "</table>";
CloseTable();
echo "<br>";
OpenTable();
echo "<strong>Leagues</strong><hr>";
echo "<table align="center" width="100%" border="1"><tr>";
echo "<tr><td><strong>Short</strong></td><td><strong>Fullname</strong></td><td><strong>Division</strong></td><td><strong>Players</strong></td><td><strong>Game</strong></td><td><strong>Action</strong></td></tr>";
$result2 = $db->sql_query("SELECT lid, ltitle, labbr, dvision, pteam, gabbr FROM ".$prefix."_league_leagues ORDER by lid");
while (list($lid, $ltitle, $labbr, $dvision, $pteam, $gabbr)=sql_fetch_row($result2)) {
echo "<tr><td>$labbr</td><td>$ltitle</td><td>$dvision</td><td>$pteam&nbsp;vs&nbsp;$pteam</td><td>$gabbr</td>";
echo "<td>(<a href='modules.php?name=$modulename&file=eleague&lid=$lid'>Edit</a>&nbsp;-&nbsp;<a href='modules.php?name=$modulename&file=dgame&lid=$lid'>Delete</a>)</td></tr>";
}
echo "</table>";
CloseTable();
echo "<br>";
OpenTable();
echo "<strong>Matches</strong><hr>";
echo "<div align="center"><table align="center" width="100%" border="1"><tr>";
echo "<tr><td><strong>Game</strong></td><td><strong>League</strong></td><td><strong>Division</strong></td><td><strong>Home Team</strong></td><td><strong>Away Team</strong></td><td><strong>Website</strong></td><td><strong>Date</strong></td><td><strong>Won/Lost</strong></td><td><strong>Action</strong></td></tr>";
$result3 = $db->sql_query("SELECT * FROM ".$prefix."_league_records ORDER by mid");
while (list($mid, $gabbr, $labbr, $dvision, $mday, $mmonth, $myear, $hteam, $ateam, $hscore, $ascore, $wrlose, $asite)=sql_fetch_row($result3)) {
echo "<tr><td>$gabbr</td><td>$labbr</td><td>$dvision</td><td>$hteam&nbsp;($hscore)</td><td>$ateam&nbsp;($ascore)</td><td><a href="$asite" target="_blank">Website</a></td><td>($mmonth-$mday-$myear)</td><td>$wrlose</td>";
echo "<td>(<a href='modules.php?name=$modulename&file=egame&gid=$gid'>Edit</a>&nbsp;-&nbsp;<a href='modules.php?name=$modulename&file=dgame&mid=$mid'>Delete</a>)</td></tr>";
}
echo "</table></div>";
switch($op) {

   case "LRgames":
   include_once(NUKE_MODULES_DIR.$module_name."/admin/games.php");
   break;
   
   case "LRleagues":
   include_once(NUKE_MODULES_DIR.$module_name."/admin/leagues.php");
   break;
   
   case "LRmatches":
   include_once(NUKE_MODULES_DIR.$module_name."/admin/matches.php");
   break;

}
CloseTable();
include("footer.php");
} else {
   include("header.php");
   GraphicAdmin();
   OpenTable();
   echo "<center><b>"._ERROR."</b><br><br>You do not have administration permission for module "$module_name"</center>";
   CloseTable();
   include("footer.php");
}
?>


It was created as an open module area and now it needs converting to admin area.


Back to top Reply with quote
#6   re: case.php gives whitescreen!
rlgnak
CZ Super Newbie
rlgnak has been a member for over 19 year's 19 Year Member
usa.gif alaska.gif
Occupation: College
Gender: Male
Status: Offline
Joined: Jun 22, 2004
0.01 posts per day
Posts: 62
Points: 3,367
   
ok you should go now [ Register or login to view links on this board. ] if thats your index.php and it should work




_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
#7   Re: re: case.php gives whitescreen!
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 42
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 


Originally posted by rlgnak @ Mon Sep 18, 2006 8:59 pm:

ok you should go now [ Register or login to view links on this board. ] if thats your index.php and it should work


See I am including that code here in the admin index.php

include(NUKE_MODULES_DIR.$module_name."/admin/nav.php");


And nav.php is this
<?php
if ( !defined('ADMIN_FILE') )
{
  die ("Access Denied");
}
OpenTable();
echo "<table align="center" width="100%"><tr>";
echo "<td align="center"><a href="$admin_file.php?op=$module_name">Records Admin</a></td>";
echo "<td align="center"><a href="$admin_file.php">Nuke Admin</a></td>";
echo "<td align="center"><a href="$adminfile.php?op=LRgames">Add Game</a></td>";
echo "<td align="center"><a href="$adminfile.php?op=LRleagues">Add League</a></td>";
echo "<td align="center"><a href="$adminfile.php?op=LRmatches">Add Match</a></td>";
echo "</tr></table>";
CloseTable();
include("footer.php");
?>


My problem is that when I upload case.php to admin/ I get a whitescreen on the admin index so I can see the menu.

I tried a little something different. I moved the switch to nav.php and now I can access the pages, but no index.


Back to top Reply with quote
#8   re: case.php gives whitescreen!
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 42
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
Ok this is just stupid, I switched everything back the way it was. Put the switch back in the index and I still can't access the admin index by clicking the League Records icon. If I click a link that is not set up it refers me back to index that works.



Back to top Reply with quote
#9   re: case.php gives whitescreen!
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 42
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
I think my best plan of action is save this incase anyone comes up with the answer and slowly start to rebuild my module the correct way.



Back to top Reply with quote
#10   re: case.php gives whitescreen!
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 42
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
I had tim and [ Register or login to view links on this board. ] take a short glance at it for me, he came up with this.

<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

if ( !defined('ADMIN_FILE') )
{
   die ("Access Denied");
}

$module_name = "League_records";
switch ($op) {
  case "League_records" :
  case "LRgames" :
  case "LRleagues" :
  case "LRmatches" :
  default :
  include("modules/$module_name/admin/index.php");
  break;

}
?>


The key missing was default: incase the switch failed and I did not assign a League_records one. Which in turn causes a blank page with the scripts used for this index.


Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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 cannot attach files in this forum
You cannot download files in this forum