HabboxWiki needs you!
Are you a Habbo buff? Or maybe a rare trader with a bunch of LTDs? Get involved with HabboxWiki to share your knowledge!
Join our team!
Whether you're raving for rares, excited for events or happy helping, there's something for you! Click here to apply
Need a helping hand?
Check out our guides for all things to help you make friends, make rooms, and make money!


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

Thread: Job app Script

  1. #1
    Join Date
    Oct 2006
    Location
    BUXTON
    Posts
    2,191
    Tokens
    0

    Latest Awards:

    Default Job app Script

    Hello, sorry i can not find a script like this. I was just wanting to know if there was a Job application, you may be asking what I mean its this...

    Job form When sent goes to a panel so you dont need to login to a email.

    So if anyone has one please shair it ..

    Thanks Jamieb

    (Not habbo...)

  2. #2
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    Give me what you want it to have, I don't do a graphical one, but I do you one you can change
    Hi, names James. I am a web developer.

  3. #3
    Join Date
    Nov 2007
    Location
    London
    Posts
    1,577
    Tokens
    36

    Latest Awards:

    Default

    Haha. http://www.habboxforum.com/showthread.php?t=499948

    It's open source, free and legal so you can just copy the application pages and mysql if you don't want to use the panel, but it has that script in it.
    Kind Regards,

    Guy
    __________________

    Since 2007. Unbelievable Uptime. Web hosting, resellers, master resellers, linux VPS, windows VPS, shoutcasts, at the lowest prices on the net.
    Tech-Hosts.co.uk.


  4. #4
    Join Date
    Oct 2006
    Location
    BUXTON
    Posts
    2,191
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Protege View Post
    Give me what you want it to have, I don't do a graphical one, but I do you one you can change

    Form
    -Name
    -Age
    -Email
    -dropdown menu
    --1
    --2
    --3
    -Message
    SUBMIT

    Backend
    -Login
    -Read Apps
    -(Reply if possable)



    Thanks!

  5. #5
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    Whats the drop-down menu for?
    Hi, names James. I am a web developer.

  6. #6
    Join Date
    Oct 2006
    Location
    BUXTON
    Posts
    2,191
    Tokens
    0

    Latest Awards:

    Default

    Select job.

  7. #7
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    I did a pretty **** job @ this, but yoou can always change it - I got stuff on my mind with my *****
    example -> http://interstudios.co.uk/freeScript...rd=omgpassword
    http://interstudios.co.uk/freeScripts/job-applications/

    ---------------------


    Login via -> admin.php?password=omgpassword

    This code below is called "admin.php"
    Code:
    <?php session_start(); ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    
    <head>
        <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
        <meta name="author" content="InterStudios.co.uk">
        <style type="text/css">
        .replied
        {
            width: 500px;
            border-color: red;
            border-style: dashed;
            border-width: thin;
            margin-bottom: 50px;
            padding: 15px;
            font-family: Tahoma;
            font-size: 12px;
        }
        
        .notreplied
        {
            width: 500px;
            border-color: black;
            border-style: dashed;
            border-width: thin;
            margin-bottom: 50px;
            padding: 15px;
            font-family: Tahoma;
            font-size: 12px;
        }
        </style>
        <title>Admin bit</title>
    </head>
    
    <body>
    <?php
    
    require_once ( 'mysqlDatabase.php' );
    
    if ( $_SESSION [ 'wet' ] === true )
    {
        switch ( $_GET [ 'cmd' ] )
        {
            case 'reply':
                mysql_query ( 'UPDATE `job-applications` SET `replied` = "1" WHERE `job-applications`.`id` = "' . mysql_real_escape_string ( $_GET[ 'replied' ] ) . '" LIMIT 1 ;' );
                echo ( '<a href="admin.php"> go back </a>' );
            break;
            default:
                $mysqlQuery = mysql_query ( 'SELECT * FROM `job-applications`' );
                if ( mysql_num_rows ( $mysqlQuery ) <= 0 )
                {
                    echo ( 'Sorry, no job applications located in the database.' );
                }
                else
                {
                    while ( $r = mysql_fetch_array ( $mysqlQuery ) )
                    {
                        if ( $r[ 'replied' ] == 1 )
                        {
                            echo ( '<div class="replied"><B>Name:</B> ' . $r[ 'field-name' ] . '<br /><B>Age:</B> ' . $r[ 'field-age' ] . '<br /><B>Email:</B> ' . $r[ 'field-email' ] . '<br /><B>Job:</B> ' . $r[ 'field-job' ] . '<br /><B>Message:</B> ' . $r[ 'field-message' ] . '</div><br /><br /><br />' );
                        }
                        else
                        {
                            echo ( '<div class="notreplied"><B>Name:</B> ' . $r[ 'field-name' ] . '<br /><B>Age:</B> ' . $r[ 'field-age' ] . '<br /><B>Email:</B> ' . $r[ 'field-email' ] . '<br /><B>Job:</B> ' . $r[ 'field-job' ] . '<br /><B>Message:</B> ' . $r[ 'field-message' ] . '<br /><br /><br /><a href="?cmd=reply&replied=' . $r[ 'id' ] . '">Reply?</a><br /><br /></div><br />' );
                        }
                    }
                }
        }
    }
    else
    {
        if ( $_GET[ 'password' ] === 'omgpassword' ) // I recommend you change "omgpassword"
        {
            $_SESSION [ 'wet' ] = true;
            echo ( '<meta http-equiv="refresh" content="0;url=' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . '">' );
        }
        else
        {
            $_SESSION [ 'wet' ] = false;
            exit ( 'ACCESS DENIED!!!!' ); // lols
        }
    }
    ?>
    </body>
    </html>
    post-application.php

    You can see the table for the MYSQL is there.
    Code:
    <?php
    
    /**
     * @author InterStudios.co.uk
     * @website www.InterStudios.co.uk
     * @coder James Rozee 
     */
    
    /*
     CREATE TABLE `interstu_japp`.`job-applications` (
    `id` TINYINT NOT NULL AUTO_INCREMENT ,
    `field-name` VARCHAR( 255 ) NOT NULL ,
    `field-age` VARCHAR( 255 ) NOT NULL ,
    `field-email` VARCHAR( 255 ) NOT NULL ,
    `field-job` VARCHAR( 255 ) NOT NULL ,
    `field-message` VARCHAR( 255 ) NOT NULL ,
    `replied` VARCHAR( 255 ) NOT NULL ,
    PRIMARY KEY ( `id` )
    ) ENGINE = MYISAM 
    */
    
    function cleanString ( $str )
    {
        return (  mysql_real_escape_string ( strip_tags( $str ) ) );
    }
    
    require_once ( 'mysqlDatabase.php' );
    
    $formFields = Array(    'field-name',
                            'field-age',
                            'field-email',
                            'field-job',
                            'field-message'
                             );
    
    $errors = Array();
                             
    for ( $i = 0; $i <= sizeof ( $formFields ); $i++ )
    {
        $explode = explode( '-', $formFields [ $i ] );
        if ( $_POST [ $formFields [ $i ] ] === '' )
        {
            $errors[] = 'Please enter information for ' . $explode [ 1 ];
        }
    }
    
    if ( sizeof( $errors ) <= 0 )
    {
        $mysqlQuery = mysql_query ( 'INSERT INTO `job-applications`
        (`id`, `field-name`, `field-age`, `field-email`, `field-job`, `field-message`, `replied`) VALUES ( NULL, "' . cleanString ( $_POST [ $formFields [ 0 ] ] ) . '", "' . cleanString ( $_POST [ $formFields [ 1 ] ] ) . '", "' . cleanString ( $_POST [ $formFields [ 2 ] ] ) . '", "' . cleanString ( $_POST [ $formFields [ 3 ] ] ) . '", "' . cleanString ( $_POST [ $formFields [ 4 ] ] ) . '", "0" ); ' );
        // Not the nicest way, but oh well.    
        if ( $mysqlQuery )
        {
            echo ( 'Information has been submitted without a problem!' );
            include ( 'index.html' );
        }
        else
        {
            echo ( 'Sorry, some reason your submission failed please try again' );
            include ( 'index.html' );
        }
    }
    else
    {
        for ( $i = 0; $i <= sizeof ( $errors ); $i++ )
        {
            echo ( $errors [ $i ] . '<br />' );
        }
    }
    
    ?>
    index.html below...
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    
    <head>
        <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
        <meta name="author" content="InterStudios.co.uk">
        <style type="text/css">
        .label
        {
            float: left;
            width: 150px;
            height: 30px;
            font-family: Tahoma;
            font-size: 12px;
            margin-right: 20px;
            padding: 5px;
        }
        </style>
        <title>Job Applications</title>
    </head>
    
    <body>
        <form name="job-applications" id="form" method="POST" action="post-application.php">
        
            <div class="label">Name</div>
            <input type="text" name="field-name"><br /><br />
            
            <div class="label">Age</div>
            <input type="text" name="field-age"><br /><br />
            
            <div class="label">Email</div>
            <input type="text" name="field-email"><br /><br />
            
            <div class="label">Which job?</div>
            <select name="field-job">
                <option selected="selected" disabled="true">Please select...</option>
                <option value="job1">Job #1</option>
                <option value="job2">Job #2</option>
                <option value="job3">Job #3</option>
            </select><br /><br />
            
            <div class="label">Message</div>
            <textarea name="field-message"></textarea><br /><br />
            
            <input type="submit" value="Send application">
        </form>
    </body>
    </html>
    mysqlDatabase.php below...
    PHP Code:
    <?php

    $mysqlData 
    = Array (     'username'     =>     'interstu_japp',
                            
    'password'     =>    'japp',
                            
    'database'     =>    'interstu_japp',
                            
    'host'        =>    'localhost'
                            
    );
                            
    $mysqlConnection mysql_connect $mysqlData 'host' ], $mysqlData 'username' ], $mysqlData 'password' ] ) or die ( 'Can\'t connect to the database because: ' mysql_error () );

    mysql_select_db $mysqlData 'database' ] );

    ?>
    Hi, names James. I am a web developer.

  8. #8
    Join Date
    Oct 2006
    Location
    BUXTON
    Posts
    2,191
    Tokens
    0

    Latest Awards:

    Default

    I get this

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/radiobe/public_html/jobs/admin.php on line 51
    Sorry, no job applications located in the database. post-application.php


    When i go on the admin.php and login..
    ??

  9. #9
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    You using the database I created?



    lols I remembered i didnt code in a delete thing, my bad I'll do it later.
    Last edited by Protege; 09-07-2008 at 08:15 PM.
    Hi, names James. I am a web developer.

  10. #10
    Join Date
    Oct 2006
    Location
    BUXTON
    Posts
    2,191
    Tokens
    0

    Latest Awards:

    Default

    Thanks is there away 2 delete the apps once they been read?

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
  •