[咪猫]免费资源中心

浏览模式: 标准 | 列表2009年02月25日的文章

textlogoSABLOG-X v1.6转WordPress 2.6.5程序源码

PHP代码
  1. <?php   
  2. /**  
  3.  * SABLOG-X v1.6 转 WordPress 2.6.5  
  4.  * author: Linvo  
  5.  * date: 2008-12-6  
  6.  * 注意:  
  7.  * 1、只转换日志和评论数据  
  8.  * 2、两者数据表在同一库中  
  9.  */  
  10. header('Content-Type:text/html;Charset=utf-8;');   
  11. date_default_timezone_set("PRC");   
  12. $DBaddress    = 'localhost';     //服务器   
  13. $DBusername = 'root';         //mysql用户名   
  14. $DBpassword = 'pwd';         //mysql密码   
  15. $DBname     = 'dbname';     //数据库名   
  16. mysql_connect($DBaddress$DBusername$DBpassword);   
  17. mysql_query('set names utf8');   
  18. mysql_select_db($DBname);   
  19.   
  20. /*  
  21.  * 添加日志  
  22.  */  
  23. $error = '';   
  24. $sql_from = 'SELECT articleid,uid,dateline,content,title,description,comments  
  25.             FROM sablog_articles';   
  26. $result = mysql_query($sql_from);   
  27. while($item = mysql_fetch_row($result))   
  28. {   
  29.     $item[2] = date('Y-m-d H:i:s'$item[2]);   
  30.     $item[3] = addslashes($item[3]);   
  31.     $item[5] = addslashes($item[5]);   
  32.     $sql_to    = "INSERT INTO wp_posts(ID,post_author,post_date,post_content,  
  33.                 post_title,post_excerpt,comment_count)   
  34.                 VALUE('$item[0]','$item[1]','$item[2]','$item[3]','$item[4]','$item[5]','$item[6]')";   
  35.     mysql_query($sql_to);   
  36.     if(mysql_affected_rows() != 1) $error .= "日志转换出错,出错ID:$item[0] <br />";   
  37.        
  38. }   
  39. if(emptyempty($error)) echo '日志转换完毕!<br />';   
  40. else echo $error;   
  41.        
  42. /*  
  43.  * 添加评论  
  44.  */  
  45. $error = '';   
  46. $sql_from = 'SELECT commentid,articleid,author,url,ipaddress,dateline,content  
  47.             FROM sablog_comments';   
  48. $result = mysql_query($sql_from);   
  49. while($item = mysql_fetch_row($result))   
  50. {   
  51.     $item[5] = date('Y-m-d H:i:s'$item[5]);   
  52.     $item[6] = addslashes($item[6]);   
  53.     $sql_to = "INSERT INTO wp_comments(comment_ID,comment_post_ID,comment_author,  
  54.                 comment_author_url,comment_author_IP,comment_date,comment_content)   
  55.                 VALUE('$item[0]','$item[1]','$item[2]','$item[3]','$item[4]','$item[5]','$item[6]')";   
  56.     mysql_query($sql_to);   
  57.     if(mysql_affected_rows() != 1) $error .= "评论转换出错,出错ID:$item[0] <br />";   
  58.        
  59. }   
  60. if(emptyempty($error)) echo '评论转换完毕!<br />';   
  61. else echo $error;   
  62. ?>  

tagsTags: wordpress

textlogo1-50G/250G-无限流量/PHP/MYSQL/CP/Reseller/FT...

Chocobo

Shared Hosting Free

50000 Disk Space

250000 bandwith

Unlimited Features

Rvskin

Rv SiteBuilder

Instant Activation

 
Offshore

1000mb DiskSpace

Unlimited Bandwith

Unlimited Features

Rvskins panel

Rv sitebuilders


Holy

Reseller

50000DiskSpace

250000 Bandwith

Unlimited Features

Rvskin Rv

Site Builders

Over selling Enable

Need Admin validation!

read this http://www.sharemafia.com/advertising-offers/12933-free-50gb-250gb-hosting.html

 

PLEASE DONT ORDER THIS IF YOU DONT DO THE REQUIRMENTS!

 

or else i will reject it

http://www.yosihost.be.ma/order/

tagsTags: php, cpanel

textlogo[09.2.24]NOD32注册码

Username: EAV-12441829
Password: xx22evnh4b
eset nod32激活码 nod32序列号
Username: EAV-12403411
Password: 6tffhwb7j2
nod32用户名 eset nod32激活码
Username: EAV-12340362
Password: hkcdfshffv
eset nod32注册码 nod32升级id
Username: EAV-12479126
Password: 8twdavh5m7
nod32序列号 eset nod32升级id
Username: EAV-12441829
Password: xx22evnh4b
eset nod32升级id nod32用户名
Username: EAV-11240271
Password: f7tmse3fdb
nod32注册码 eset nod32升级id
Username: EAV-11229979
Password: jx2tewb8xt
eset nod32序列号 nod32激活码
Username: EAV-11247660
Password: uxnd76nk7p
eset nod32序列号 nod32用户名
Username: EAV-10504765
Password: d4cjjmrt3b

tagsTags: nod32













  • 分类数量: 5
  • 文章数量: 5142
  • 评论数量: 795
  • 标签数量: 206
  • 附件数量: 16
  • 注册用户: 290
  • 今日访问: 1600
  • 总访问量: 2503242
  • 程序版本: 1.6
  • xhtmllogo
  • csslogo