May 16, 2008

Login Script For Vbulletin.

Free Web Hosting, No Ads > Have your say > Support and Feedback > Questions & Queries

free web hosting

Login Script For Vbulletin.

savge17
For some reason when I try to logon from the main page it doesnt work, it just brings me to the forums unlogged. Anyone here have any ideas whats wrong with my coding?

Heres the webpage:
www.ageofilluminati.com

Heres the coding im Using:

QUOTE
<form action="http://ageofilluminati.com/login.php?" method="get" id="login" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)">

<div class="sidecontent">
<br /><img src="images/username.jpg" alt=""/>
<input type="text" class="form" value="User Name" name="vb_login_username" accesskey="u" onfocus="if (this.value == 'User Name') this.value = '';" />
<br /><img src="images/password.jpg" alt=""/>
<input type="password" class="form" value="" name="vb_login_password" tabindex="102" />
<a href="http://www.ageofilluminati.com/login.php?do=lostpw">Forgot password?</a> <br />
<a href="http://www.ageofilluminati.com/register.php">Register for free!</a>
<input name="Submit" type="submit" class="submit" value="" />
</div>

</form>

 

 

 


Reply

sonesay
I just looked at your forum and when you submit a login from there it gets sent to http://ageofilluminati.com/login.php?do=login
I'm guessing you need to have the variable 'do' set to 'login' so it will try and process the login.
CODE
<form action="http://ageofilluminati.com/login.php?do=login"



Reply

jlhaslip
Just asking:

Is the web page named index.html? and the Forum named index.php in the same directory? Might be some confusion about that. (having two index files in the directory)
It would be typical to have the Forum set-up in its own 'folder' so there is a seperation.

Also, most Forums use a very specific Login process, so the code for the login needs to be reviewed to assist you further. Any chance you can post the receiving page contents? It would be a php page.

Reply

savge17
QUOTE(jlhaslip @ Apr 5 2008, 01:18 PM) *
Just asking:

Is the web page named index.html? and the Forum named index.php in the same directory?


Yea they are in the same directory, I kinda messed up on setting it up that way. Anyways im going to move everyhting to the forums folder and see if it fixes it.

Reply

savge17
I just switched everything to the forums directory and it still doesnt work. I get the folowing error.
CODE
Not Found
The requested URL /form action= was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


Hmmm well as for the receiving page contents you do mean login.php right? Because of:
CODE
<form action="http://ageofilluminati.com/login.php?do=login"


Here is login.php:
CODE
<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.6.8
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2000-2007 Jelsoft Enterprises Ltd. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'login');

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array();

// pre-cache templates used by specific actions
$actiontemplates = array(
    'lostpw' => array(
        'lostpw'
    )
);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
require_once(DIR . '/includes/functions_login.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$vbulletin->input->clean_gpc('r', 'a', TYPE_STR);

if (empty($_REQUEST['do']) AND empty($vbulletin->GPC['a']))
{
    exec_header_redirect($vbulletin->options['forumhome'] . '.php');
}

// ############################### start logout ###############################
if ($_REQUEST['do'] == 'logout')
{
    $vbulletin->input->clean_gpc('r', 'logouthash', TYPE_STR);

    if ($vbulletin->userinfo['userid'] != 0 AND $vbulletin->GPC['logouthash'] != $vbulletin->userinfo['logouthash'])
    {
        eval(standard_error(fetch_error('logout_error', $vbulletin->session->vars['sessionurl'], $vbulletin->userinfo['logouthash'])));
    }

    process_logout();

    $vbulletin->url = fetch_replaced_session_url($vbulletin->url);
    if (strpos($vbulletin->url, 'do=logout') !== false)
    {
        $vbulletin->url = $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q'];
    }
    $show['member'] = false;
    eval(standard_error(fetch_error('cookieclear', create_full_url($vbulletin->url), $vbulletin->options['forumhome'], $vbulletin->session->vars['sessionurl_q']), '', false));

}

// ############################### start do login ###############################
// this was a _REQUEST action but where do we all login via request?
if ($_POST['do'] == 'login')
{
    $vbulletin->input->clean_array_gpc('p', array(
        'vb_login_username'        => TYPE_STR,
        'vb_login_password'        => TYPE_STR,
        'vb_login_md5password'     => TYPE_STR,
        'vb_login_md5password_utf' => TYPE_STR,
        'postvars'                 => TYPE_STR,
        'cookieuser'               => TYPE_BOOL,
        'logintype'                => TYPE_STR,
        'cssprefs'                 => TYPE_STR,
    ));

    // can the user login?
    $strikes = verify_strike_status($vbulletin->GPC['vb_login_username']);

    if ($vbulletin->GPC['vb_login_username'] == '')
    {
        eval(standard_error(fetch_error('badlogin', $vbulletin->options['bburl'], $vbulletin->session->vars['sessionurl'], $strikes)));
    }

    // make sure our user info stays as whoever we were (for example, we might be logged in via cookies already)
    $original_userinfo = $vbulletin->userinfo;

    if (!verify_authentication($vbulletin->GPC['vb_login_username'], $vbulletin->GPC['vb_login_password'], $vbulletin->GPC['vb_login_md5password'], $vbulletin->GPC['vb_login_md5password_utf'], $vbulletin->GPC['cookieuser'], true))
    {
        ($hook = vBulletinHook::fetch_hook('login_failure')) ? eval($hook) : false;

        // check password
        exec_strike_user($vbulletin->userinfo['username']);

        if ($vbulletin->GPC['logintype'] === 'cplogin' OR $vbulletin->GPC['logintype'] === 'modcplogin')
        {
            // log this error if attempting to access the control panel
            require_once(DIR . '/includes/functions_log_error.php');
            log_vbulletin_error($vbulletin->GPC['vb_login_username'], 'security');
        }
        $vbulletin->userinfo = $original_userinfo;

        if ($vbulletin->options['usestrikesystem'])
        {
            eval(standard_error(fetch_error('badlogin_strikes', $vbulletin->options['bburl'], $vbulletin->session->vars['sessionurl'], $strikes)));
        }
        else
        {
            eval(standard_error(fetch_error('badlogin', $vbulletin->options['bburl'], $vbulletin->session->vars['sessionurl'])));
        }
    }

    exec_unstrike_user($vbulletin->GPC['vb_login_username']);

    // create new session
    process_new_login($vbulletin->GPC['logintype'], $vbulletin->GPC['cookieuser'], $vbulletin->GPC['cssprefs']);

    // do redirect
    do_login_redirect();

}
else if ($_GET['do'] == 'login')
{
    // add consistency with previous behavior
    exec_header_redirect($vbulletin->options['forumhome'] . '.php');
}

// ############################### start lost password ###############################
if ($_REQUEST['do'] == 'lostpw')
{
    $vbulletin->input->clean_gpc('r', 'email', TYPE_NOHTML);
    $email = $vbulletin->GPC['email'];

    if ($permissions['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['canview'])
    {
        $navbits = construct_navbits(array('' => $vbphrase['lost_password_recovery_form']));
        eval('$navbar = "' . fetch_template('navbar') . '";');
    }
    else
    {
        $navbar = '';
    }

    $url =& $vbulletin->url;
    eval('print_output("' . fetch_template('lostpw') . '");');
}

// ############################### start email password ###############################
if ($_POST['do'] == 'emailpassword')
{

    $vbulletin->input->clean_gpc('p', 'email', TYPE_STR);

    if ($vbulletin->GPC['email'] == '')
    {
        eval(standard_error(fetch_error('invalidemail', $vbulletin->options['contactuslink'])));
    }

    require_once(DIR . '/includes/functions_user.php');

    $users = $db->query_read_slave("
        SELECT userid, username, email, languageid
        FROM " . TABLE_PREFIX . "user
        WHERE email = '" . $db->escape_string($vbulletin->GPC['email']) . "'
    ");
    if ($db->num_rows($users))
    {
        while ($user = $db->fetch_array($users))
        {
            $user['username'] = unhtmlspecialchars($user['username']);

            $user['activationid'] = build_user_activation_id($user['userid'], 2, 1);

            eval(fetch_email_phrases('lostpw', $user['languageid']));
            vbmail($user['email'], $subject, $message, true);
        }

        $vbulletin->url = str_replace('"', '', $vbulletin->url);
        eval(print_standard_redirect('redirect_lostpw', true, true));
    }
    else
    {
        eval(standard_error(fetch_error('invalidemail', $vbulletin->options['contactuslink'])));
    }
}

// ############################### start reset password ###############################
if ($vbulletin->GPC['a'] == 'pwd' OR $_REQUEST['do'] == 'resetpassword')
{

    $vbulletin->input->clean_array_gpc('r', array(
        'userid'       => TYPE_UINT,
        'u'            => TYPE_UINT,
        'activationid' => TYPE_UINT,
        'i'            => TYPE_UINT
    ));

    if (!$vbulletin->GPC['userid'])
    {
        $vbulletin->GPC['userid'] = $vbulletin->GPC['u'];
    }

    if (!$vbulletin->GPC['activationid'])
    {
        $vbulletin->GPC['activationid'] = $vbulletin->GPC['i'];
    }

    $userinfo = verify_id('user', $vbulletin->GPC['userid'], 1, 1);

    $user = $db->query_first("
        SELECT activationid, dateline
        FROM " . TABLE_PREFIX . "useractivation
        WHERE type = 1
            AND userid = $userinfo[userid]
    ");

    if (!$user)
    {
        // no activation record, probably got back here after a successful request, back to home
        exec_header_redirect($vbulletin->options['forumhome'] . '.php');
    }

    if ($user['dateline'] < (TIMENOW - 24 * 60 * 60))
    {  // is it older than 24 hours?
        eval(standard_error(fetch_error('resetexpired', $vbulletin->session->vars['sessionurl'])));
    }

    if ($user['activationid'] != $vbulletin->GPC['activationid'])
    { //wrong act id
        eval(standard_error(fetch_error('resetbadid', $vbulletin->session->vars['sessionurl'])));
    }

    // delete old activation id
    $db->query_write("DELETE FROM " . TABLE_PREFIX . "useractivation WHERE userid = $userinfo[userid] AND type = 1");

    // make random number
    $newpassword = vbrand(0, 100000000);

    // init user data manager
    $userdata =& datamanager_init('User', $vbulletin, ERRTYPE_STANDARD);
    $userdata->set_existing($userinfo);
    $userdata->set('password', $newpassword);
    $userdata->save();

    ($hook = vBulletinHook::fetch_hook('reset_password')) ? eval($hook) : false;

    eval(fetch_email_phrases('resetpw', $userinfo['languageid']));
    vbmail($userinfo['email'], $subject, $message, true);

    eval(standard_error(fetch_error('resetpw', $vbulletin->session->vars['sessionurl'])));

}

/*======================================================================*\
|| ####################################################################
|| #
|| # CVS: $RCSfile$ - $Revision: 16422 $
|| ####################################################################
\*======================================================================*/
?>

 

 

 


Reply

jlhaslip
Ummm...

I don't know about vbulletin specifically, but most Forum Softwares won't let you simply 'move' the files without changing some of the configuration settings, etc, so the software knows where to find everything and all the referencing for files and stuff gets out of whack if you just copy/move files.
You might need to re-install into the Forum Folder instead. That would be my guess.

Reply

savge17
Ah well you're probably right about that. I dont know everything seems to be working though in the forums...are you saying in order for the login script on my homepage to work I should re-install the forums?

I just edited my forums and re-installed it and the script still doesnt work. Again im using:

CODE
form action="http://ageofilluminati.com/login.php?do=login.php" method="get" id="login" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)">

<div class="sidecontent">
<br /><img src="images/username.jpg" alt=""/>
<input type="text" class="form" value="User Name" name="vb_login_username" accesskey="u" onfocus="if (this.value == 'User Name') this.value = '';" />
<br /><img src="images/password.jpg" alt=""/>
<input type="password" class="form" value="" name="vb_login_password" tabindex="102" />
<a href="http://www.ageofilluminati.com/login.php?do=lostpw">Forgot password?</a> <br />
<a href="http://www.ageofilluminati.com/register.php">Register for free!</a>
<input name="Submit" type="submit" class="submit" value="" />
</div>

</form>

Reply

savge17
Bump. Does anyone have any ideas whats up with my login script? Thx.



Reply

jlhaslip
If the forum is in its own folder, below the account {root}, and this code is being run in the account root, then the form *might* need to point to the subfolder in the action = .

QUOTE
form action="http://ageofilluminati.com/*add folder here*/login.php?do=login.php" method="get" id="login" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)">

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : login, script, vbulletin,

  1. New Hosting Account Problems
    Can't find cpanel login page (11)
  2. Hosting Phpld Script On Trap17
    (2)
    I am Interested to apply a free hosting on trap17.I would like to know if I can host
    PHPLinkDirectory Script(PHPLD) on tra17.Does anyone know about or if an admin came across this post
    let me know.I will constanly check this post.I really need to know about it.I have been on many free
    hosting and they can't host PHPLD.Its requirement is MYSQL, PHP, .htaccess, mod_rewrite.If
    anyone already using it on trap17 let me know.....
  3. Cpanel Login Trouble!
    (4)
    Plz help me out with my cpanel mess!! with correct username and psswrd i cannot log in...was
    working fine sme days bck when i purchased it!! i`m losing business as i cannot reply to
    emails as they woudn`t open either!!! whats this mess?? I tried to log in with my
    default psswrd which was mailed to me!! lemme outta dis people!!!!
    /unsure.gif" style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" /> link to
    my website is https://sun.host.ac:2083/frontend/x3/index.html ....
  4. Can't Login
    (8)
    Hey guys, I am trying to log into my Trap17 account, but can't seem to get in. I may have just
    forgot my password, but I have it written down, and it worked a few times before :/ I did recently
    change my domain, does that effect the username? If it is my fault and I just forgot something, is
    there a place I can do the "Forgot Password?" thing, and have my user/pass emailed to me? Thanks in
    advance to any replies /smile.gif" style="vertical-align:middle" emoid=":)" border="0"
    alt="smile.gif" />....
  5. I Can't Login With Firefox And Other Problems
    (7)
    I am having a problem: When trying to login with firefox, I just can't, it takes me back to the
    login page without being loged in. I am wondering why? Plus while logging in with IE6, The forums
    main page is always displayed the same. Not even the forum but the whole forum. I can't see my
    posts nor my credits. And PMs inclueded. I tried deleting all offline pages, setting up the cookies
    and deleting all my history sites, but none of this work. Perhaps it's because I newly installed
    Google Web accelerator. I don't need it, so I am thinking of uninstalling i....
  6. Login Bug
    Keeps asking me to input a password (6)
    I do not know if any of you have occurred this problem while trying to login to Trap17, but I did. I
    go through the normal login steps, entering the username and password before clicking the submit
    button, and expecting to be logged in into the forum. But it always brings me to the error page,
    prompting me to key in my password, but my password is already in the password field. Although this
    is a minor glitch, but it is getting kinda irritating especially since I always login using my
    company's computer.....
  7. Cpanel Login
    (2)
    i just got approved this morning and i cant login.....i logged in earlier but now its saying that
    the password is wrong and im 99 percent positive that its right....please help!....
  8. Trap17 Credit Script
    (3)
    i.e. the code that Trap17 uses to calculate peoples credit from the posts they make... Is it
    commercially available? If not, how would someone go around getting something similar? Thanks ....
  9. Cpanel Login
    Some help here? (3)
    I created a hosting account sometime this afternoon. I was able to go in and look around the cpanel,
    but I didn't do anything. However, a few hours later, I was unable to login. The ftp login using
    cmd was fine but the cpanel login at www.trap17.com/cpanel failed. I wasted 10 credits changing the
    password. Please enlighten me. I apologize for using File-> save on the hosting account create
    page. It didn't manage to save my account info. Where can I get them again?....
  10. Auto Login To Trap17 Forum
    without signing in (4)
    everytime i come to this forum i have to log back in why is this? it cant be a problem on my end
    because i goto several other Invision Boards and i never have to keep logging in on those ones.
    Please be specific with topic title and do not leave description empty. Moving from General Talk to
    Support. ....
  11. The Credit System Script Module
    Looking from some general data (4)
    Ran a search...did not find anything. Who wrote the code for the credit system? Is it legal for
    others to use it? Thanks, htdefiant Modified topic title. ....
  12. I Cant Login To Cpanel
    (6)
    i have a problem... i ordered free hosting and i get the aproval, then i go to trap17.com/process
    and i create my accuont. When it asked do i have TLDomain of i wont something.trap17.com i answered
    that i have domain... oke no problem with that. just where to forward my domain ? where is my site ?
    i tryed sqlbyte.trap17.com it wont work... and i cant login in cpanel with my username and
    password... /huh.gif' border='0' style='vertical-align:middle' alt='huh.gif' /> so can someone
    help me ? thanks in advance.....
  13. Not Given Credit For A Post?
    Problem in the script? (4)
    I just posted a reasonable post here and did not appear to be given any credits for it. I know
    this because I always check the number of credits I get for each post, just to see if I improve each
    time. I don't really need the credits as I have plenty, but I'm wondering if there might
    be a problem with the 'credit' script. As you can see my post consisted primarily of a list,
    maybe this confused the script? Can someone please check if the script awards credits correctly when
    a list is used? After further testing, it seems this problem is not confine....
  14. Can't Login
    my username and password is incorrect... (0)
    I accidently let the number of hosting days go to a (-) # of days, and then i brought it back up to
    a (+) number of days. Do I have to wait a certain amount of time or something before my account is
    reactivated? thanks.....
  15. Login And Registration Mysql Problems
    Session terminates too quickly (2)
    Although I'm doing some tweaking, I have finally got just about everything down in developing a
    login feature to my website, but just one problem. The session terminates too quickly. For
    instance, someone will be instructed to login, and after browsing a couple pages, it'll come up
    again that the user is not logged in. In addtion, this occurs frequently but not all the time.
    What can I do that will eliminate this inconvience to my viewers?....
  16. Inactive Member Termination Script Executed
    Friday, 21 January 2005 14:58:00 GMT (-1)
  17. My Login
    why cant i login (2)
    I have a hasting from here and the websites http://xgames.trap17.com/index and when i try to login
    ftp or admin on my site it says wrong password please help me admins.....

    1. Looking for login, script, vbulletin,

Searching Video's for login, script, vbulletin,
advertisement



Login Script For Vbulletin.



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE