黑客: Nuke2Xoops极简版(用户表)
发布者: canbulaOn 2006/12/26 8:10:00 阅读量:7378今天我需要这些php代码将nuke用户转移到xoops网站上,并我已经编写了这些代码,希望与大家分享。
非常简单,只需使用它
$MysqlHost = "localhost"; // your mysql host
$MysqlKullanici = "root"; // your mysql user name
$MysqlSifre = ""; // your mysql password
$NukeVeritabaniAdi = "nuke"; // your nuke database name
$NukeVeritabaniOneki = "nuke"; // your nuke prefix
$XoopsVeritabaniAdi = "xoops"; // your xoops database name
$XoopsVeritabaniOneki = "xoops"; // your xoops prefix
$veriyolu = mysql_connect($MysqlHost, $MysqlKullanici, $MysqlSifre);
mysql_select_db($NukeVeritabaniAdi, $veriyolu);
$nukeuyelerinisor = mysql_query("SELECT * FROM ".$NukeVeritabaniOneki."_users ORDER BY user_id ASC");
while($nukeuyeleri = mysql_fetch_array($nukeuyelerinisor)) {
mysql_select_db($XoopsVeritabaniAdi);
$kayit = mysql_query("INSERT INTO ".$XoopsVeritabaniOneki."_users (uid, uname, email, user_regdate, pass, umode) VALUES('".$nukeuyeleri['user_id']."', '".$nukeuyeleri['username']."', '".$nukeuyeleri['user_email']."', '".time()."', '".$nukeuyeleri['user_password']."', 'flat');");
if($kayit) {
mysql_query("INSERT INTO ".$XoopsVeritabaniOneki."_groups_users_link (groupid, uid) VALUES ('2', '".$nukeuyeleri['user_id']."');");
echo $nukeuyeleri['username']." added successfully
";
}
else {
echo $nukeuyeleri['username']." passd because this id has already exists
";
}
}
echo "
That's all .... http://www.xoopshocasi.com">XoopSHoCasI";
mysql_close($veriyolu);
?>
Bora Canbula -- [email protected]
未经认证的XOOPS支持