Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 4 of 4

Thread: KPRC2 Update 1

  1. #1
    Join Date
    Feb 2007
    Posts
    38
    Tokens
    0

    Default KPRC2 Update 1

    Ahhh does anyone have this as the original d/l link doesnt work!

    i need it to fix the request line.

    error message for normal djs:
    Code:
     Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/twomedia/public_html/radio/requests.php on line 121
    requests.php:
    PHP Code:
    <?php
    if(!defined("kristall"))
    {
      
    session_start();
     include(
    "functions.php");
     
    loginerror();
     exit;
    }
    else
    {
     
    login();
    }
    ?>
    <?php
    echo("
      <span class=\"title\">Request Line</span><br />Welcome to the request line, here you can view your requests and delete messages with the option to delete multiple messages at once!
      <form action=\"?view=requests&act=delete\" method=\"post\">
      <br />
      <input type=\"submit\" name=\"submit\" value=\"Delete selected requests\">
      <hr size=\"1\">
      <a href=\"?view=requests&type=Song Request\">Requests</a> | <a href=\"?view=requests&type=Listener Shoutout\">Shoutouts</a> | <a href=\"?view=requests&type=Competition Entry\">Comps</a> | <a href=\"?view=requests&type=Joke Submission\">Jokes</a> | <a href=\"?view=requests&type=Other Submission\">Other</a> | <a href=\"?view=requests&type=all\">All</a>
      <hr size=\"1\">"
    );
    switch(
    $_GET["act"])
    {
     case 
    "delete":
      foreach(
    $HTTP_POST_VARS as $key => $value)
      {
       if(!
    is_numeric($value))
       {}
       else
       {
        
    $sql mysql_query("SELECT `dj` FROM `requests` WHERE `id` = '$value'");
        if(
    mysql_num_rows($sql) == "1")
        {
        
    $fetch mysql_fetch_array($sql);
        if(
    $fetch["dj"] == $_SESSION["kristall_username"] || $_SESSION["kristall_level"] == "Senior DJ" || $_SESSION["kristall_level"] == "Administrator" || $_SESSION["kristall_level"] == "Super Administrator")
        {
         
    mysql_query("DELETE FROM `requests` WHERE `id` = '$value'");
        }
        else
        {
         
    notice("Requests not deleted.");
         echo(
    "One or more requests have not been deleted due do you not being the rightful owner of them<br />
         You are now being taken back to the main request line, if you'd prefer not to wait, please click <a href=\"?view=requests\">here</a><meta http-equiv=\"refresh\" content=\"2;url=?view=requests\">"
    );
         
    endnotice();
        }
        }
       }
      }
      
    notice("Requests deleted.");
      echo(
    "The requests you selected have been deleted<br />
      You are now being taken back to the main request line, if you'd prefer not to wait, please click <a href=\"?view=requests\">here</a><meta http-equiv=\"refresh\" content=\"8;url=?view=requests\">"
    );
      
    endnotice();
     break;
     
     case 
    "reportform":
      
    $id clean($_GET["id"]);
      
    $fetch mysql_fetch_array(mysql_query("SELECT `dj` FROM `requests` WHERE `id` = '$id'"));
      if(
    $fetch["dj"] == $_SESSION["kristall_username"] || $_SESSION["kristall_username"] == "Administrator" || $_SESSION["kristall_level"] == "Super Administrator")
      {
       
    notice("Are You Sure?");
       echo(
    "Are you sure you wish to report this Request?<br /><br />
       <a href=\"?view=requests&act=report&id=
    $id\">I'm Sure, Report the Request</a><br />
       <a href=\"?view=requests&act=viewform\">I'm Not Sure, Take me Back</a>"
    );
       
    endnotice();
      }
      else 
      {
       
    notice("That isn't your request");
       echo(
    "That isn't your request to view. You are now being taken back to the Request System.<br /><br />
       If you'd prefer not to wait, please click <a href=\"?view=requests\">here</a><meta http-equiv=\"refresh\" content=\"8;url=?view=requests\">"
    );
       
    endnotice();
      }
     break;
     
     case 
    "report":
      
    $id clean($_GET["id"]);
      
    $fetch mysql_fetch_array(mysql_query("SELECT `dj` FROM `requests` WHERE `id` = '$id'"));
      if(
    $fetch["dj"] == $_SESSION["kristall_username"] || $_SESSION["kristall_username"] == "Administrator" || $_SESSION["kristall_level"] == "Super Administrator")
      {
       
    mysql_query("UPDATE `requests` SET `reported` = '1' WHERE `id` = '$id'");
       
    notice("Private Message Reported");
       echo(
    "The Request you selected, with id tag $id, has been successfully reported. An Administrator will view this Request and take action accordingly. You are now being taken back to the Request system.<br /><br />
       If you'd prefer not to wait, please click <a href=\"?view=requests\">here</a><meta http-equiv=\"refresh\" content=\"8;url=?view=requests\">"
    );
       
    endnotice();
      }
      else 
      {
       
    notice("That isn't your request");
       echo(
    "That isn't your request to view. You are now being taken back to the Request System.<br /><br />
       If you'd prefer not to wait, please click <a href=\"?view=requests\">here</a><meta http-equiv=\"refresh\" content=\"8;url=?view=requests\">"
    );
       
    endnotice();
      }
     break;
     
     default:
      if(isset(
    $_GET["type"]))
      {
       
    $type clean($_GET["type"]);
      }
      else 
      {
       
    $type "all";
      }
      if(
    $_SESSION["kristall_level"] == "DJ" && $type != "all")
      {
       
    $sql mysql_query("SELECT * FROM `requests` WHERE `dj` = {$_SESSION["kristall_username"]} AND `type` = '$type' AND `reported` = '0' ORDER BY `id` ASC");
      }
      elseif(
    $_SESSION["kristall_level"] == "DJ" && $type == "all")
      {
       
    $sql mysql_query("SELECT * FROM `requests` WHERE `dj` = {$_SESSION["kristall_username"]} AND `reported` = '0' ORDER BY `id` ASC");
      }
      elseif(
    $_SESSION["kristall_level"] != "DJ" && $type != "all")
      {
       
    $sql mysql_query("SELECT * FROM `requests` WHERE `type` = '$type' ORDER BY `id` ASC");
      }
      else 
      {
       
    $sql mysql_query("SELECT * FROM `requests` ORDER BY `id` ASC");
      }
      while(
    $fetch mysql_fetch_array($sql))
      {
       if(
    $_SESSION["kristall_level"] != "DJ")
       {
        
    $sentto = ("<b>To:</b> {$fetch["dj"]}");
        
    $ips = ("<b>IP:</b> {$fetch["ip"]}");
       }
       if(
    $fetch["reported"] == "1")
       {
        if(
    $_SESSION["kristall_level"] == "Administrator" || $_SESSION["kristall_level"] == "Super Administrator")
        {
         
    $colour " background: #fff2f2;";
        }
        else 
        {
         
    $colour "";
        }
       }
       else 
       {
        
    $colour "";
       }
       echo(
    '<table border="0" width="100%" cellpadding="3" style="border-collapse: collapse;'.$colour.'" cellspacing="2">
     <tr>
      <td width="2%" rowspan="2"><input type="checkbox" class="rofl" name="'
    .$fetch["id"].'" value="'.$fetch["id"].'"></td>
      <td colspan="2">
      <table cellpadding="0" cellspacing="0" width="100%">
       <tr>
        <td width="35%" valign="top"><b>From:</b> '
    .$fetch["sender"].'</td>
        <td width="35%" valign="top"><b>Type:</b> '
    .$fetch["type"].'</td>
        <td width="30%">
        '
    $ips .'
        </td>
       </tr>
       <tr>
        <td width="35%" valign="top"><b>Date:</b> '
    .$fetch["date"].'</td>
        <td width="35%" valign="top"><b>Report:</b> <a href="?view=requests&act=reportform&id='
    .$fetch["id"].'">Click to Report</a></td>
        <td width="30%">
        '
    .$sentto.'
        </td>
       </tr>
      </table>
      </td>
     </tr>
     <tr>
      <td valign="top"><b>Message:</b></td>
      <td width="90%" valign="top">'
    .$fetch["message"].'</td>
     </tr>
    </table><hr size="1">'
    );
      }
      echo(
    "</form>");
    }
    ?>
    many thanks
    curtis

  2. #2
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    replace lines 105 - 117 with this:

    PHP Code:
      if($_SESSION["kristall_level"] == "DJ" && $type != "all")
      {
       
    $sql mysql_query("SELECT * FROM `requests` WHERE `dj` = '{$_SESSION["kristall_username"]}' AND `type` = '$type' AND `reported` = '0' ORDER BY `id` ASC");
      }
      elseif(
    $_SESSION["kristall_level"] == "DJ" && $type == "all")
      {
       
    $sql mysql_query("SELECT * FROM `requests` WHERE `dj` = '{$_SESSION["kristall_username"]}' AND `reported` = '0' ORDER BY `id` ASC");
      }
      elseif(
    $_SESSION["kristall_level"] != "DJ" && $type != "all")
      {
       
    $sql mysql_query("SELECT * FROM `requests` WHERE `type` = '$type' ORDER BY `id` ASC");
      }
      else 


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  3. #3
    Join Date
    Feb 2007
    Posts
    38
    Tokens
    0

    Default

    thanks ever so much!

    i would rep but i dont have any rep power x[

  4. #4
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Curtis View Post
    thanks ever so much!

    i would rep but i dont have any rep power x[
    No problem, if I can get in touch with Bahram I'll get him to upload a fixed version to Habboring.


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

Posting Permissions

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