Any Help will be wecomed

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Any Help will be wecomed
leo51
CZ Super Newbie
leo51 has been a member for over 20 year's 20 Year Member
usa.gif michigan.gif
Website:
Status: Offline
Joined: Jul 13, 2004
0.00 posts per day
Posts: 35
Points: 2,907
   
Hi, I had the following mod working with phpBB xx as a stand alone but now that I am using phpNuke it will not work . Its a small piece of coding that I used for loggin to an external area of my site using the same username/password in phpBB database. Can someone show me how would I get it to work within phpNuke:

(phpNuke 7.4/phpBB 2.0.10)

<?php

header('Content-type: text/plain');

define('IN_PHPBB', true);

$retval = 0;
$phpbb_root_path = './';

include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.' . $phpEx);

$username = $HTTP_GET_VARS['username'];
$password = md5($HTTP_GET_VARS['password']);
$ip = $HTTP_GET_VARS['ip'];

$sql = "SELECT user_level FROM " . USERS_TABLE . " " .
       "WHERE username = '" . str_replace("\'", "''", $username) .  "' " .
       "AND user_password = '" . str_replace("\'", "''", $password) .  "' " .
       "AND user_active > 0"; 
      
if ($result = $db->sql_query($sql))
{
    if($row = $db->sql_fetchrow($result))
    {
       $retval = 1;
       if($row['user_level'] == ADMIN)
       {
          $retval = 2;
       }
    }
}

echo "$retval\n";

?>


Many thanks


Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum