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!


Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Sep 2008
    Posts
    718
    Tokens
    0

    Default Power Panel Problem.

    Ok, so I'm using power panel, and when I try to delete a request I get this:

    Fatal error: Call to undefined function: checkaccount() in /homepages/34/d237406810/htdocs/wsb4850525601/powerpanel/delreq.php on line 7

    delreq.php
    PHP Code:
    <?php
    session_start
    ();
    include(
    "includes/config.php");

    if(isset(
    $_SESSION['username']) && isset($_SESSION['password']) && $_SESSION['level']) {

    checkaccount($_SESSION[username]);

    $id $_GET['id'];

    $query mysql_query("DELETE FROM requests WHERE id = '$id'") or die('Could not delete request: '.mysql_error());

    echo(
    "<br /><center><strong>Request deleted!</strong> Please reload this page</center>");

    die();
    }
    ?>
    Any ideas? +rep will be given.
    +.net - omg it's coming o_o

  2. #2
    Join Date
    Jan 2006
    Location
    Kent
    Posts
    987
    Tokens
    0

    Default

    Post the config file as i'm assuming that will/should include the function or a functions file. If it does include a funtions file, post that as well.
    This is our situation and we're happy to be here,
    I wouldn't change this place for anything.


  3. #3
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    The function check account on line 7 has not been defined anyway, is what it is saying.


  4. #4
    Join Date
    Sep 2008
    Location
    UK
    Posts
    3,670
    Tokens
    0

    Latest Awards:

    Default

    Yeah, post the config as there will be the functions in there. It's basically a problem with the checkaccount(); function.
    Back for a while.

  5. #5
    Join Date
    Sep 2008
    Posts
    718
    Tokens
    0

    Default

    config.php is blank?

    Here is the functions file:
    PHP Code:
    <?php
    include("config.php");

    function 
    clean($string) {
    $string htmlspecialchars($string);
    $string stripslashes($string);
    $string mysql_escape_string($string);
    $string htmlentities($string);
    $string str_replace("\""""$string); // Don't ask why after I did stripslashes() [:
    $string str_replace(">"""$string);
    $string str_replace("<"""$string);
    return 
    $string;


    function 
    censor($string) {
    ## We need to censor the text
    #################################

    $words file_get_contents("http://powerpanel.duosystems.net/grab/swears.txt");

    $wordz explode("|"$words);

    foreach(
    $wordz as $bad) {

            
    $string str_replace($bad"*****"strtolower($string));

    }

    return 
    $string;

    #################################
    ## Censored!
    }

    function 
    encrypt($string) {
    $string md5($string);
    $string base64_encode($string);
    $string md5($string);
    $string base64_decode($string);
    $string md5($string);
    return 
    $string;
    }

    // Email address valid checker
    function check_email_address($email) {
    // First, we check that there's one @ symbol, and that the lengths are right
    if (!ereg("^[^@]{1,64}@[^@]{1,255}$"$email)) {
    // Email invalid because wrong number of characters in one section, or wrong number of @ symbols.
    return false;
    }
    // Split it into sections to make life easier
    $email_array explode("@"$email);
    $local_array explode("."$email_array[0]);
    for (
    $i 0$i sizeof($local_array); $i++) {
    if (!
    ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$"$local_array[$i])) {
    return 
    false;
    }
    }
    if (!
    ereg("^\[?[0-9\.]+\]?$"$email_array[1])) { // Check if domain is IP. If not, it should be valid domain name
    $domain_array explode("."$email_array[1]);
    if (
    sizeof($domain_array) < 2) {
    return 
    false// Not enough parts to domain
    }
    for (
    $i 0$i sizeof($domain_array); $i++) {
    if (!
    ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$"$domain_array[$i])) {
    return 
    false;
    }
    }
    }
    return 
    true;
    }

    ## BBCode
    function bbcode($string) {
    $string str_replace('[b]'"<strong>"$string);
    $string str_replace("[/b]""</strong>"$string);
    $string str_replace("[u]""<u>"$string);
    $string str_replace("[/u]""</u>"$string);
    $string str_replace("[i]""<i>"$string);
    $string str_replace("[/i]""</i>"$string);
    $string str_replace("[s]""<strike>"$string);
    $string str_replace("[/s]""</strike>"$string);
    $string str_replace("[code]"'<div style="margin-left: 5px; margin-top: 5px;">Code:<br /><div style="border: dotted 1px #000000; padding: 4px;"><!-- Code -->'$string);
    $string str_replace("[/code]""<!-- / Code --></div></div>"$string);

    if(@
    preg_match("/<div style=\"margin-left: 5px; margin-top: 5px;\">Code:<br /><div style=\"border: dotted 1px #000000; padding: 4px;\"><!-- Code -->/i"$string) && !@preg_match("/<!-- / Code --></div></div>/i"$string)) {
    $string ""$string ."</div></div>";
    }

    $string str_replace("[quote]"'<div style="margin-left: 5px; margin-top: 5px;">Quote:<br /><div style="border: dotted 1px #000000; padding: 4px;"><!-- Quote -->'$string);
    $string str_replace("[/quote]""<!-- / Quote --></div></div>"$string);

    if(@
    preg_match("/<div style=\"margin-left: 5px; margin-top: 5px;\">Quote:<br /><div style=\"border: dotted 1px #000000; padding: 4px;\"><!-- Quote -->/i"$string) && !@preg_match("/<!-- / Quote --></div></div>/i"$string)) {
    $string ""$string ."<!-- / Quote --></div></div>";
    }

    return 
    $string;
    }

    function 
    checkaccount($username) {

    $user $username;

    $check = @mysql_num_rows(mysql_query("SELECT * FROM users WHERE username = '$user'"));

    if(
    $check == "0") {
    session_destroy();
    die();
    return;
    }
    else {
    return;
    }
    }

    ?>
    Last edited by HabbDance; 23-11-2008 at 09:54 PM.
    +.net - omg it's coming o_o

  6. #6
    Join Date
    Sep 2008
    Location
    UK
    Posts
    3,670
    Tokens
    0

    Latest Awards:

    Default

    On delreq.php does it have
    PHP Code:
    <?php include("includes/functions.php"); ?>
    If not add it as it's not picking up that function.
    Back for a while.

  7. #7
    Join Date
    Jan 2006
    Location
    Kent
    Posts
    987
    Tokens
    0

    Default

    Quote Originally Posted by Excellent2 View Post
    On delreq.php does it have
    PHP Code:
    <?php include("includes/functions.php"); ?>
    If not add it as it's not picking up that function.
    It might be including it in the config file, that's why I asked him to post the config file, ignored though :rolleyes:
    This is our situation and we're happy to be here,
    I wouldn't change this place for anything.


  8. #8
    Join Date
    Sep 2008
    Location
    UK
    Posts
    3,670
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Joe! View Post
    It might be including it in the config file, that's why I asked him to post the config file, ignored though :rolleyes:
    He said it was blank though.
    Back for a while.

  9. #9
    Join Date
    Jan 2006
    Location
    Kent
    Posts
    987
    Tokens
    0

    Default

    Ah touche. Didn't see that bit. Surely it shouldn't be blank? If it is, that's obviously what's causing the problem..
    This is our situation and we're happy to be here,
    I wouldn't change this place for anything.


  10. #10
    Join Date
    Sep 2008
    Posts
    718
    Tokens
    0

    Default

    Quote Originally Posted by Excellent2 View Post
    He said it was blank though.
    Thank you.

    Quote Originally Posted by Joe! View Post
    It might be including it in the config file, that's why I asked him to post the config file, ignored though :rolleyes:
    Stated it was blank.

    Quote Originally Posted by Excellent2 View Post
    On delreq.php does it have
    PHP Code:
    <?php include("includes/functions.php"); ?>
    If not add it as it's not picking up that function.
    AH THANKS WORKED A CHARM +rep
    Edit: Need to spread. I'll add you in my sig. My list is getting quite long
    Last edited by HabbDance; 23-11-2008 at 10:10 PM.
    +.net - omg it's coming o_o

Page 1 of 2 12 LastLast

Posting Permissions

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