Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Help with this radio management script.

  1. #1
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry Help with this radio management script.

    Ok, Problem. When you try to change the password in this script it gives error:

    Warning: include(.php) [function.include]: failed to open stream: No such file or directory in /misc/25/000/097/126/9/user/web/xivioradio.com/phpdj/dj/djpage.php on line 105

    Warning: include(.php) [function.include]: failed to open stream: No such file or directory in /misc/25/000/097/126/9/user/web/xivioradio.com/phpdj/dj/djpage.php on line 105

    Warning: include() [function.include]: Failed opening '.php' for inclusion (include_path='.:/usr/share/pear') in /misc/25/000/097/126/9/user/web/xivioradio.com/phpdj/dj/djpage.php on line 105




    Here is the script from the djpage.php file:


    Code:
    <style type="text/css">
    <!--
    body {
    	background-color: #FFFFCC;
    }
    body,td,th {
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	font-size: 10px;
    	color: 000000;
    }
    -->
    </style><?php
    $page = $_GET['page'];
    $type = $_GET['type'];
    $name = $_GET['name'];
    
    if ($_SESSION["phprank"] == "Suspended"){
    echo "Your account is suspended.  You may <b>NOT</b> access this page.";
    include "blank.html";
    exit();
    } else if($page == "main"){
    echo "Welcome to Radio Panel™, <b>".$_SESSION["phpname"]."</b>.<br>You are currently a(n) <b>".$_SESSION["phprank"];
    	} else if($page == "requests"){
    		$showit = mysql_query("SELECT * FROM `dj` WHERE type='1' ORDER BY `id`");
    		while($row = mysql_fetch_array($showit)){
    			echo "<b>Name:</b> ".$row["habbo"];
    			echo "<br><b>Request:</b> ".$row["msg"];
    			echo "<br><b>Time Sent:</b> ".$row["time"];
    			echo "<br><b>Ip:</b> (".$row["ip1"]." / ".$row["ip2"].")";
    			echo "<br><a href=\"delete.php?id=".$row["id"]."\">Delete Request</a>";
    	}
    		echo "---
    		<br />
    If a request is abusive, please report it <a href=\"dj.php?page=15\">here</a>.";
    	} else if($page == "shoutouts"){
    		$showit = mysql_query("SELECT * FROM `dj` WHERE type='2' ORDER BY `id`");
    		while($row = mysql_fetch_array($showit)){
    			echo "<b>Name:</b> ".$row["habbo"];
    			echo "<br><b>Shout:</b> ".$row["msg"];
    			echo "<br><b>Time Sent:</b> ".$row["time"];
    			echo "<br><b>Ip:</b> (".$row["ip1"]." / ".$row["ip2"].")";
    			echo "<br><a href=\"delete.php?id=".$row["id"]."\">Delete Shoutout</a><hr>";
    	}
    		echo "---
    		<br />
    If a shoutout is abusive, please report it <a href=\"dj.php?page=15\">here</a>.";
    	} else if($page == "complaints"){
    		if ($_SESSION["phprank"] == "admin" OR "Staff DJ"){
    			$showit = mysql_query("SELECT * FROM `dj` WHERE type='3' ORDER BY `id`");
    			while($row = mysql_fetch_array($showit)){
    				echo "<b>Name:</b> ".$row["habbo"];
    				echo "<br><b>Complaint:</b> ".$row["msg"];
    				echo "<br><b>Time Sent:</b> ".$row["time"];
    				echo "<br><b>Ip:</b> (".$row["ip1"]." Or ".$row["ip2"].")";
    				echo "<br><a href=\"delete.php?id=".$row["id"]."\">Delete Complaint</a><hr>";
    			}
    			echo "---
    			<br />
    If a complaint is abusive, please report it <a href=\"dj.php?page=15\">here</a>.";
    		} else {
    			echo "Sorry DJ. Only admins can page complaints.";
    		}
    	} else if($page == "competition"){
    		$showit = mysql_query("SELECT * FROM `dj` WHERE type='4' ORDER BY `id`");
    		while($row = mysql_fetch_array($showit)){
    			echo "<b>Name:</b> ".$row["habbo"];
    			echo "<br><b>Competition Answer:</b> ".$row["msg"];
    			echo "<br><b>Time Sent:</b> ".$row["time"];
    			echo "<br><b>Ip:</b> (".$row["ip1"]." / ".$row["ip2"].")";
    			echo "<br><a href=\"delete.php?id=".$row["id"]."\">Delete Competition Entry</a>";
    	}
    		echo "---
    		<br />
    If a competition entry is abusive, or contains spam, please report it <a href=\"dj.php?page=15\">here</a>.";
    	} else if($page == "other"){
    		$showit = mysql_query("SELECT * FROM `dj` WHERE type='5' ORDER BY `id`");
    		while($row = mysql_fetch_array($showit)){
    			echo "<b>Name:</b> ".$row["habbo"];
    			echo "<br><b>'Other' Entry:</b> ".$row["msg"];
    			echo "<br><b>Time Sent:</b> ".$row["time"];
    			echo "<br><b>Ip:</b> (".$row["ip1"]." / ".$row["ip2"].")";
    			echo "<br><a href=\"delete.php?id=".$row["id"]."\">Delete 'Other' Entry</a><hr>";
    	}
    		echo "---
    		<br />
    If an 'other' entry is abusive, or contains spam, please report it <a href=\"dj.php?page=15\">here</a>.";
    	} else if($page == "all"){
    		$showit = mysql_query("SELECT * FROM `dj` ORDER BY `id`");
    		while($row = mysql_fetch_array($showit)){
    			if ($row["type"] == "3"){
    			} else {
    				echo "<b>Name:</b> ".$row["habbo"];
    				echo "<br><b>Entry:</b> ".$row["msg"];
    				echo "<br><b>Time Sent:</b> ".$row["time"];
    				echo "<br><b>Ip:</b> (".$row["ip1"]." / ".$row["ip2"].")";
    				echo "<br><a href=\"delete.php?id=".$row["id"]."\">Delete Entry</a><hr>";
    			}
    	}
    		echo "---
    		<br />
    If an entry is abusive, or contains spam, please report it <a href=\"dj.php?page=15\">here</a>.";
    	} else if ($type == "html") {
    		include "$page.html";
    		} else {
    		include "$page.php";
    		}
    ?>
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  2. #2
    Join Date
    Jan 2007
    Location
    Boulder City, Nevada
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    It appears the the variable "$page" is not being populated.
    Line 105 is returning ".php" (filename is missing).

  3. #3
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    are you putting page in the url?
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  4. #4
    Join Date
    Jan 2007
    Location
    Boulder City, Nevada
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    How are you calling the script?
    if someting like...

    http://mywebs.com/djscript.php?page="main"

    $page = $_GET['page']; is returning a NULL value?

  5. #5
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    Yeah, Apollo gave a good example. First of all, you're calling $page from the url, so it should look something like this:

    djpage.php?page=index

    index is the page
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  6. #6
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I don't exaccly understand what you guys are saying. Just to let you know, I didn't write this script, and it is used often, the other people have no problem.
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  7. #7
    Join Date
    Jan 2007
    Location
    Boulder City, Nevada
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The variable $page is supposed to be set to something in Line 13
    Code:
    $page = $_GET['page'];
    For some reason $_GET['page'] is empty, NULL or blank. So when Line 105 is executed, it causes an error
    Code:
    include "$page.php";
    Instead of being set to requests, shoutouts, complaints, competition, other or all. It is set to "" , so it's trying to load a page called ".php" instead of say "all.php".

    Good Luck...

  8. #8
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I get it.... Any idea on how to figure out what it should be? Instead of .php?
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  9. #9
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Try adding this in the code:

    Code:
    if ($_GET['page'] == "") {
      $page = "all"; //change this for your default page
    }
    
    else {
      $page = $_GET['page'];
    }
    what that will do is check to see if $_GET['page'] is empty, if it is then it will assign $page to the default page you want. If it is not empty, it will simply assign $_GET['page'] to the $page variable.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  10. #10
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    But what is the default page?
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •