White Screen in Admin for My Module

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   White Screen in Admin for My Module
Furnfield
CZ Newbie
Furnfield has been a member for over 16 year's 16 Year Member
uk.gif
Occupation: Student
Gender: Male
Fav. Sports Team: Ireland Rugby Team
Website:
Status: Offline
Joined: Jun 06, 2007
0.00 posts per day
Posts: 2
Points: 0
   
Hello

I got your link again from Donovans Credits list for MILPACS..

I am creating a module for eto-league.com (same community that he was making his for)

I have studied his coding and cant work out my problem..

When i go to view my admin panel for it i am getting a pure white screen..

My case.php and links.php and index.php are in my admin folder as a dirrectory off my module

html/modules/league/admin

case.php
<?php

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

$module_name = "league";
include_once("modules/leauge/admin/language/lang-english.php");

switch($op) {
       case "":
       case "Add_Team":
       case "Edit_Team":
       case "Organise":
       case "Edit_Scores":
       case "Edit_Settings":
include("modules/league/admin/index.php");
   break;
}

?>


links.php

<?php
   
if (!defined('ADMIN_FILE')) {
   die ("Access Denied");
}
$modname = "league";
get_lang($modname);
if ($radminsuper=="1" || $auth_user == "1") {
    adminmenu("admin.php?op=league", _LEAGUE_MENU, "league.png");
}

?>


index.php

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

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='Reviews'"));
$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) {

   switch($op) {
      case "":
         league();
         break;
      case "Add_Team";
         include("modules/".$module_name."/admin/add_team.php");
         break;
      case "Edit_Team";
         include("modules/".$module_name."/admin/edit_team.php");
         break;
      case "Organise";
         include("modules/".$module_name."/admin/organise.php");
         break;
      case "Edit_Scores";
         include("modules/".$module_name."/admin/edit_scores.php");
         break;
      case "Edit_Settings";
         include("modules/".$module_name."/admin/edit_settings.php");
         break;
}
} 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");
}

function league() {
global $db, $prefix, $module_name, $admin_file, $bgcolor1, $bgcolor2;
include_once("header.php");
   OpenTable();
   echo "<center><b>Well Done!</b></center>";
   CloseTable();
include_once("footer.php");
}
?>


This is the first side i have created hte backend of a phpnuke module so any help will be greatky appreciated!


Back to top Reply with quote
#2   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 45
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
Do you have error_reporting ON or OFF? Looks like it might be off thats why it isn't showing you an error. Lets make a few changes and see if it shows up.

Change:


    case "":


To:


    default:


And change all the case from:


      case "Add_Team";


Replace the semicolon with a colon:


      case "Add_Team":


Check if you have error_reporting ON.



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   
Furnfield
CZ Newbie
Furnfield has been a member for over 16 year's 16 Year Member
uk.gif
Occupation: Student
Gender: Male
Fav. Sports Team: Ireland Rugby Team
Website:
Status: Offline
Joined: Jun 06, 2007
0.00 posts per day
Posts: 2
Points: 0
   
thanks for the fast reply

I did have error reporting on..

but yes that fixed it..

Thanks a lot.

Expect to see me back here again asking more questions...



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