本帖最后由 saleroad 于 2010-7-29 14:46 编辑
有人发了个把uc里面用户一次性转移到dz里面的计划任务脚本。
代码如下,不知道怎样修改为转移到ss里面的。- <?php
- if(!defined('IN_DISCUZ')) {
- exit('Access Denied');
- }
- $query = $db->query("SELECT * FROM ".UC_DBTABLEPRE."members WHERE uid not in(select uid from {$tablepre}members) ");
- while($user = $db->fetch_array($query)) {
- $password=$user[password];
-
-
- $db->query(" replace INTO {$tablepre}members (uid,username,password,adminid,groupid,regip,regdate,lastip,lastvisit,lastactivity,email) VALUES ('$user[uid]', '$user[username]', '$password','0','10','$user[regip]','$user[regdate]','$user[lastloginip]','$user[lastlogintime]','$user[lastlogintime]','$user[email]'); ");
-
- $db->query(" replace INTO {$tablepre}memberfields (uid) VALUES ('$user[uid]')");
- }
- ?>
复制代码 |