Andy's Blog » » OSC与PHPWind2.0的整合代码

OSC与PHPWind2.0的整合代码

这里贴出的是phpwind2.0的连接代码,步骤及相关修改参考“OSC与Discuz2.5F的整合代码

phpwind.php代码

<?php
 
if($forum_nick!='') {
 
require(DIR_WS_PHPWIND . 'data/sql_config.php');
 
mysql_connect($dbhost, $dbuser, $dbpw);
 
mysql_select_db($dbname);
 
$query = mysql_query("SELECT COUNT(*) FROM {$PW}members WHERE username='$forum_nick'");
 
if(mysql_result($query, 0)) {
 
mysql_close();
 
} else {
 
mysql_query("INSERT INTO {$PW}members (username, password, email, groupid, memberid, regdate, lastvisit, thisvisit)
VALUES ('
$forum_nick', '".md5($password)."', '$email_address', '-1', '8', '".time()."', '".time()."', '".time()."')");
 
mysql_query("UPDATE {$PW}bbsinfo SET newmember='$forum_nick',totalmember=totalmember+1");
 
mysql_close();
 
}
 
}
 
?>

感谢radnows分享.

Incoming search terms:

Tags:

本文地址: http://www.21andy.com/new/20050831/35.html

1 评论 to “PHP开源CMS之MODx”

  1. ncfexshx 于 2007-01-10 20:31:22 发表:

    ncfexshx...

    ncfexshx...