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 3 123 LastLast
Results 1 to 10 of 27
  1. #1
    Join Date
    Mar 2005
    Location
    Leeds
    Posts
    3,423
    Tokens
    0

    Latest Awards:

    Default Login system. Need a quick hand.

    I am working on a DJ login for Bobboid.
    With 2 tools. DJ requests and a DJ says.

    I am working on the DJ says first because that should be easyer.

    [Can I ask you not to use it for the time being, I may let people use it once Its been writen]

    In the files I have

    - index.htm [Login page]
    - login.php [Form handler]
    - djsays.txt [Holds the Data for dj says]
    - config.php [Holds data like username, passwords ect]
    - admin.php [Holds admin tools, and links]
    - show.php [Shows data submitten via admin cp, from "djsays.txt"]

    Faults are in index.htm [I need to no how to send it to the form handler], admin.php [How can I protect it, via the login? Need help (Dont no how) to use cookies do save your login for "x" seconds]


    Here the codes I have writen

    index.htm
    HTML Code:
    <html>
    <form name="form1" method="post">
    <div>Username: 
    <input id="userinput" type="text" value="" name="userinput"> 
    <br>
    <br>Password: 
    <input id="passinput" type="password" value="" name="passinput"> 
    <br>
    <br>
    <input type="submit" value="Submit" name="Submit"> 
    <input type="reset" value="Reset" name="Reset"> 
    <input id="action" type="hidden" value="submit" name="action"> </div></form>
    </html>
    login.php

    PHP Code:
    <?php 
    include('config.php');

    if(
    $action == "submit"){
        if((
    $userinput == "")||($passinput == "")){
        echo 
    "$info";
        } else {
            if((
    $userinput == $user)&&($passinput == $pass)){
            
    header"Location: $url);
            } else {
            echo 
    "$fail";
            }
        }
    }
    include(
    'form.php')    ;
    ?>
    djsays.txt
    Anything you want.
    config.php
    PHP Code:
    <?PHP
    //Config
    //Writen by Danny for Bobboid.NET
    $user "User";
    $pass "Password";
    $email "[email protected]";
    $url "http://www.test.com/admin.php";
    $fail "Wrong password/user";
    $info "No information";
    //End config
    ?>
    admin.php
    Nothing been writen for it yet.
    show.php
    PHP Code:
    <?php
    include ("config.php");
    include (
    "djsays.txt");
    ?>
    </font>

    Okay!

    Can anyone help me with...

    - Making a form to edit the data in "djsays.txt"
    - Fix index.htm
    - Make admin.php safe...


    Thanks people

  2. #2
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    I dont see how it works.
    Ok conspetualy.
    Form submits and data is writen to djsays.txt

    Then when u inslude a txt file it would just be a jumble of lines, youd realy need to put it in to a loop and form it?
    And is jdsays holding public submitions or what the dj is actaly saying?

    I dont get what this systems supposed to do, could u give a expnition to conspet and what all the bits are supposedly doing as it would make it easyer to help "/

  3. #3
    Join Date
    Mar 2005
    Location
    Kidlington, Oxford.
    Posts
    7,274
    Tokens
    0

    Latest Awards:

    Default

    Carl, it lets people type something into a box on the site. And anyone can see the box but he needs help with the login system for it.

    I hope thats what he means :/

  4. #4
    Join Date
    Mar 2005
    Location
    Leeds
    Posts
    3,423
    Tokens
    0

    Latest Awards:

    Default

    Okay,

    The index.htm is the login for DJ's ect.

    admin.php will have a form for where you can edit the djsays.php


    But. index.htm need sorting, it needs to go onto login.php.

    And the admin.php needs protecting, as the login system wouldnt protect it.


    Edit: Yes mr craig "_" your correct, and the data is saved onto .txt file.

  5. #5
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Ok, so index.htm should probaly be index.php then u can ether header redirect or include the pages you want, your login system should place a cookie, wich cvan then be checked for on admin.php that would act as securty for that and any other pages?

  6. #6
    Join Date
    Mar 2005
    Location
    Leeds
    Posts
    3,423
    Tokens
    0

    Latest Awards:

    Default

    Yep, I need help me with the cookies and the index.php for the login.

    I realy dont get this stuff "_"

    You/ anyone else who can help will be thanked on the Read me and config.


    Thanks!

  7. #7
    Join Date
    Jul 2004
    Location
    Webby Forums!
    Posts
    1,879
    Tokens
    0

    Latest Awards:

    Default

    so for sercurity maybe use:
    PHP Code:
    <?php
    session_start
    ();
    include(
    'config.php');

    if(
    $action == "submit"){
        if((
    $userinput == "")||($passinput == "")){
        echo 
    "$info";
        } else {
            if((
    $userinput == $user)&&($passinput == $pass)){
            
    header"Location: $url);
    $_SESSION['user'] = $user;
            } else {
            echo 
    "$fail";
            }
        }
    }
    include(
    'form.php')    ;
    ?>
    and then on the pages you want secured add:
    PHP Code:
    session_start();
    if (!
    $_SESSION['name']) {
        echo 
    "You aren't logged in.";
        include(
    "login_form.html");
        exit();

    o and to add it to the the formhandler use:
    HTML Code:
    <form action="login.php" method="post">


    Chilimagik.net // Reviews, Band Biographies, News, Pics + Loads More!!
    [Thybag.co.uk - Vive la revolutione]

  8. #8
    Join Date
    Nov 2004
    Location
    HabboWeb FM Offices
    Posts
    3,019
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Luckyrare™
    I am working on a DJ login for Bobboid.
    With 2 tools. DJ requests and a DJ says.

    I am working on the DJ says first because that should be easyer.

    [Can I ask you not to use it for the time being, I may let people use it once Its been writen]

    In the files I have

    - index.htm [Login page]
    - login.php [Form handler]
    - djsays.txt [Holds the Data for dj says]
    - config.php [Holds data like username, passwords ect]
    - admin.php [Holds admin tools, and links]
    - show.php [Shows data submitten via admin cp, from "djsays.txt"]

    Faults are in index.htm [I need to no how to send it to the form handler], admin.php [How can I protect it, via the login? Need help (Dont no how) to use cookies do save your login for "x" seconds]


    Here the codes I have writen

    index.htm
    HTML Code:
    <html>
    <form name="form1" method="post">
    <div>Username: 
    <input id="userinput" type="text" value="" name="userinput"> 
    <br>
    <br>Password: 
    <input id="passinput" type="password" value="" name="passinput"> 
    <br>
    <br>
    <input type="submit" value="Submit" name="Submit"> 
    <input type="reset" value="Reset" name="Reset"> 
    <input id="action" type="hidden" value="submit" name="action"> </div></form>
    </html>
    login.php

    PHP Code:
    <?php 
    include('config.php');

    if(
    $action == "submit"){
        if((
    $userinput == "")||($passinput == "")){
        echo 
    "$info";
        } else {
            if((
    $userinput == $user)&&($passinput == $pass)){
            
    header"Location: $url);
            } else {
            echo 
    "$fail";
            }
        }
    }
    include(
    'form.php')    ;
    ?>
    djsays.txt


    config.php
    PHP Code:
    <?PHP
    //Config
    //Writen by Danny for Bobboid.NET
    $user "User";
    $pass "Password";
    $email "[email protected]";
    $url "http://www.test.com/admin.php";
    $fail "Wrong password/user";
    $info "No information";
    //End config
    ?>
    admin.php


    show.php
    PHP Code:
    <?php
    include ("config.php");
    include (
    "djsays.txt");
    ?>
    </font>

    Okay!

    Can anyone help me with...

    - Making a form to edit the data in "djsays.txt"
    - Fix index.htm
    - Make admin.php safe...


    Thanks people
    Admin center for only admins is (IF you set rank as admin)

    if ($admin)

    echo "Site here"

    if ($!admin)

    echo "Sorry your not a admin"

  9. #9
    Join Date
    Mar 2005
    Location
    Leeds
    Posts
    3,423
    Tokens
    0

    Latest Awards:

    Default

    Thanks Mate!

    Now I keep getting a error,

    I can re type the password again and again but no luck...
    I have moved it into different places on the .php page.

    Have a look.

    http://www.bobboid.net/danny/test/DJ/index.htm

    User: demo
    Pass: demo

    PHP Coding for Admin Page:

    PHP Code:
    <font face=verdana size=1>
    <br>Navigator: <a href="admin.php" target="_self">Home</a>

    <?php

     session_start
    ();
    if (!
    $_SESSION['name']) {
        echo 
    "You aren't logged in.";
        include(
    "login_form.html");
        exit();

    if(!
    $show){ $show $HTTP_GET_VARS['show']; }

    if(
    $show=="stats"){
    include (
    "stats.php");
    ?>

    <?php
    }
    else{
    include (
    "config.php");
    echo 
    "<br>";
    echo 
    "<br>Welcome to $scdef DJ tool!<br>";
    echo 
    "<br><b>Shoutcast details</b>";
    echo 
    "<br>IP: $ip";
    echo 
    "<br>Port: $port";
    ?>

    <?php
    }
    ?> 
    <BR><BR><BR><BR><CENTER>Bobboid.NET</CENTER>
      </font>

    Thanks mate


    Thanks cr, I needed that. Rep Added. and also to splint

  10. #10
    Join Date
    Mar 2005
    Location
    Kidlington, Oxford.
    Posts
    7,274
    Tokens
    0

    Latest Awards:

    Default

    Navigator: Home
    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home2/bobboid/public_html/danny/test/DJ/admin.php:4) in /home2/bobboid/public_html/danny/test/DJ/admin.php on line 6
    You aren't logged in.
    Warning: main(login_form.html): failed to open stream: No such file or directory in /home2/bobboid/public_html/danny/test/DJ/admin.php on line 9

    Warning: main(login_form.html): failed to open stream: No such file or directory in /home2/bobboid/public_html/danny/test/DJ/admin.php on line 9

    Warning: main(): Failed opening 'login_form.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/bobboid/public_html/danny/test/DJ/admin.php on line 9
    Thats what it says for lazy people

Page 1 of 3 123 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
  •