Home | How it works | Projects archive | Contact Us
Air Compressor Bot
 
The Career Path of Freelance Programming Jobs 

   Php expert needed to upgrade script phpbb2 to function with phpbb3

Bidding Time:
09/09/2008 22:54 - 10/09/2008 00:00
Budget:
$30-250
Status:
Closed

Job Type:
PHP, Flash, Website Design, Graphic Design
Description:



I will pay 40$ max for this simple upgrade.

I currently have user registrations and logins integrated on my site with
phpbb2. I am looking for an individual to upgrade this script to function with
phpbb3. Please do not bid if you do not have previous experience, I would like
to have this completed as soon as possible. The following is the script I am
currently using to integrate the phpbb2 registration.


<?PHP
// Contribs: Richard Munroe, Tony Fugere
class phpbb
{
public function __construct($patch)
{
global $db;
$this->patch = $patch;
}
public function check_login()
{
global $db, $lang, $board_config;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
require_once($this->patch.'/config.php');
define('IN_PHPBB',true);
$phpbb_root_path = $this->patch;
require_once( $phpbb_root_path . "extension.inc" );
require_once( $phpbb_root_path . "common.php" );
$cok = $board_config[ "cookie_name" ].'_data';
$x = stripslashes($_COOKIE[$cok]);
$x = unserialize($x);
IF(is_array($x) and $x['userid'] != -1)
{
return true;
}
else
{
return false;
}
}
public function logout()
{
global $db, $lang, $board_config;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
echo $SID;
$session_id = $SID;
require_once($this->patch.'/config.php');
define('IN_PHPBB',true);
$phpbb_root_path = $this->patch;
require_once( $phpbb_root_path . "extension.inc" );
require_once( $phpbb_root_path . "common.php" );
$x = $HTTP_COOKIE_VARS['phpbb2mysql_data'];
$x = unserialize(stripslashes($x));
$phpbb_user_id = $x['userid'];
session_end( $session_id, $phpbb_user_id );
setcookie( $board_config[ "cookie_name" ] . "_sid",
"", time() - 3600, " " );
setcookie( $board_config[ "cookie_name" ] . "_mysql",
"", time() - 3600, " " );
}
public function login($login, $pass)
{
global $db, $board_config;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
require_once($this->patch.'/config.php');
define('IN_PHPBB',true);
define("IN_LOGIN", true);
$phpbb_root_path = $this->patch;
require_once( $this->patch . "extension.inc" );
require_once( $this->patch . "common.php" );
$sql = "SELECT user_id FROM " . USERS_TABLE . " WHERE username =
'" . str_replace("'", "''", $login) . "' AND
user_password = '".md5($pass)."'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
IF(isset($row['user_id']))
{
return session_begin( $row['user_id'], $user_ip, PAGE_INDEX, FALSE, TRUE );
}
else
{
return false;
}
}
public function register($login, $pass, $email, $useractive = 1)
{
global $db, $board_config;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
//global $config;
require_once($this->patch.'/config.php');
//echo $this->patch;
define('IN_PHPBB',true);
define("IN_LOGIN", true);
$phpbb_root_path = $this->patch;
require_once( $this->patch . "/extension.inc" );
require_once( $this->patch . "/common.php" );
$sql = "SELECT user_id FROM " . USERS_TABLE . " ORDER BY user_id
DESC LIMIT 1";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$id = $row['user_id'] + 1;
$pass = md5($pass) ;
$sql = "INSERT INTO " .USERS_TABLE ." (user_id, user_active,
username, user_password, user_email) " ." VALUES ("
.""$id", " .""$useractive", "
.""$login", " .""$pass", "
.""$email")" ;
$db->sql_query($sql) ;
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id,
user_pending) VALUES ('".$id."', '".$id."', 0)";
$db->sql_query($sql);
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_type,
group_description, group_moderator, group_single_user) VALUES
('".$id."', 1, 'Personal User', 0, 1)";
$db->sql_query($sql);
}
public function recoverpass($login, $pass)
{
global $db, $board_config;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
require_once($this->patch.'/config.php');

define('IN_PHPBB',true);
define("IN_LOGIN", true);
$phpbb_root_path = $this->patch;
require_once( $this->patch . "extension.inc" );
require_once( $this->patch . "common.php" );
$pass = md5($pass) ;

$sql = "UPDATE " .USERS_TABLE ." set `user_password` =
'".$pass."' where `username`='".$login."'";
$db->sql_query($sql) ;

}

public function is_admin()
{
global $db, $board_config;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
require_once($this->patch.'/config.php');
define('IN_PHPBB',true);
define("IN_LOGIN", true);
$phpbb_root_path = $this->patch;
require_once( $this->patch . "extension.inc" );
require_once( $this->patch . "common.php" );
$cok = $board_config[ "cookie_name" ].'_data';
$x = stripslashes($_COOKIE[$cok]);
$x = unserialize($x);
IF(count($x) > 1)
{
$sql = "SELECT group_id FROM " . USER_GROUP_TABLE . " WHERE
user_id = '" . str_replace("'", "''", $x['userid']) .
"'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
IF($row['group_id'] == 2)
{
return true;
}
}
else
{
return false;
}
}
public function is_user()
{
global $db, $board_config;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
require_once($this->patch.'/config.php');
define('IN_PHPBB',true);
define("IN_LOGIN", true);
$phpbb_root_path = $this->patch;
require_once( $this->patch . "extension.inc" );
require_once( $this->patch . "common.php" );
$cok = $board_config[ "cookie_name" ].'_data';
$x = stripslashes($_COOKIE[$cok]);
$x = unserialize($x);
IF(count($x) > 1)
{
$sql = "SELECT group_id FROM " . USER_GROUP_TABLE . " WHERE
user_id = '" . str_replace("'", "''", $x['userid']) .
"'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
IF($row['group_id'] == 3)
{
return true;
}
}
else
{
return false;
}
}
public function board_config()
{
global $db, $lang, $board_config;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
require_once($this->patch.'/config.php');
define('IN_PHPBB',true);
$phpbb_root_path = $this->patch;
require_once( $phpbb_root_path . "extension.inc" );
require_once( $phpbb_root_path . "common.php" );
return $board_config;
}
public function get_user_data()
{
global $db, $board_config;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;

require_once($this->patch.'/config.php');
define('IN_PHPBB',true);
define("IN_LOGIN", true);
$phpbb_root_path = $this->patch;
require_once( $this->patch . "extension.inc" );
require_once( $this->patch . "common.php" );
$cok = $board_config[ "cookie_name" ].'_data';
$x = stripslashes($_COOKIE[$cok]);
$x = unserialize($x);
IF(count($x) > 1)
{
$sql = "SELECT * FROM " . USERS_TABLE . " WHERE user_id =
'" . str_replace("'", "''", $x['userid']) .
"'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
return $row;
}
else
{
return false;
}
}
}
?>

STOPzilla! Anti-Spyware Software

Related Projects:
Flash Customization & Intro
Imdb clone
Animation Tutorial Project
Flash Webcam Application
Flash with Sound website needed

This project is the proprietary information of . Click here to remove this project from OUR database.
Operating System:
(I don't know)
Database System:
(I don't know)
<<< back

Recent Projects Archive:

Wednesday - Tuesday - Monday - Sunday - Saturday - Friday - Thursday

View all freelance web projects

 
Home | Projects archive | RSS | Resources | Links | Contact Us © 2004-2009 ProjectsList.biz /0.05