dede 转 帝国
1.转换栏目
insert into ak_enewsclass (classid,bclassid,classname,myorder,classpath,intro,classpagekey) select id,reid,typename,sortrank,typedir,description,keywords from dede_arctype; update ak_enewsclass set tbname='news', modid='1',lencord=23; update ak_enewsclass set islist=1,listtempid=1,dtlisttempid=1,newstempid=1,classtype='.html',filetype='.html';
2.更新栏目featerclass字段
<?php
require ('e/class/connect.php'); //引入数据库配置文件和公共函数文件
require ('e/class/db_sql.php'); //引入数据库操作文件
$link = db_connect(); //连接MYSQL
$empire = new mysqlquery(); //声明数据库操作类 $sql = $empire ->query("select classid,bclassid from {$dbtbpre}enewsclass");
while($r = $empire ->fetch($sql))
{
$featherclass = '';
if($r['bclassid']){
$featherclass .= '|' .$r['bclassid'];
$sql1 = $empire ->query("select classid,bclassid from {$dbtbpre}enewsclass where classid = $r[bclassid]");
if($r1 = $empire ->fetch($sql1)){
if($r1['bclassid']){
$featherclass = '|' .$r1['bclassid'] .$featherclass;
$sql2 = $empire ->query("select classid,bclassid from {$dbtbpre}enewsclass where classid = $r1[bclassid]"); if($r2 = $empire ->fetch($sql2)){
if($r2['bclassid']){
$featherclass = '|' .$r2['bclassid'] .$featherclass;
$sql3 = $empire ->query("select classid,bclassid from {$dbtbpre}enewsclass where classid = $r2[bclassid]");
if($r3 = $empire ->fetch($sql3)){
if($r3['bclassid']){
$featherclass = '|' .$r3['bclassid'] .$featherclass;
$sql4 = $empire ->query("select classid,bclassid from {$dbtbpre}enewsclass where classid = $r3[bclassid]");
if($r4 = $empire ->fetch($sql4)){
if($r4['bclassid']){
$featherclass = '|' .$r4['bclassid'] .$featherclass;
$sql5 = $empire ->query("select classid,bclassid from {$dbtbpre}enewsclass where classid = $r4[bclassid]");
if($r5 = $empire ->fetch($sql5)){
if($r5['bclassid']){
$featherclass = '|' .$r5['bclassid'] .$featherclass;
$sql6 = $empire ->query("select classid,bclassid from {$dbtbpre}enewsclass where classid = $r5[bclassid]");
if($r6 = $empire ->fetch($sql6)){
if($r6['bclassid']){
$featherclass = '|' .$r6['bclassid'] .$featherclass;
} }
} }
} }
} }
}
}
}
}
$featherclass .= '|';
if($empire ->query("update {$dbtbpre}enewsclass set featherclass = '$featherclass' where classid = $r[classid]")){
echo $r['classid'] .'更新成功<br>';
}else
echo $r['classid'] .'更新失败~~~~~~~~~<br>';
}
} db_close(); //关闭MYSQL链接
$empire = null; //注消操作类变量
?>
3.更新栏目sonclass字段
<?php
require('e/class/connect.php'); //引入数据库配置文件和公共函数文件
require('e/class/db_sql.php'); //引入数据库操作文件
$link=db_connect(); //连接MYSQL
$empire=new mysqlquery(); //声明数据库操作类 $sql=$empire->query("select classid,islast from {$dbtbpre}enewsclass");
while($r=$empire->fetch($sql))
{
//echo"栏目ID:".$r['classid'];
if(!$r['islast']){
$sql1=$empire->query("select classid,islast from {$dbtbpre}enewsclass where bclassid = $r[classid]");
$sonclass = '';
while($r1=$empire->fetch($sql1)){
if($r1['islast']) $sonclass = $sonclass.$r1['classid'].'|';
else{
$sql2=$empire->query("select classid,islast from {$dbtbpre}enewsclass where bclassid = $r1[classid]");
while($r2=$empire->fetch($sql2)){
if($r2['islast']) $sonclass =$sonclass.$r2['classid'].'|';
else{
$sql3=$empire->query("select classid,islast from {$dbtbpre}enewsclass where bclassid = $r2[classid]");
while($r3=$empire->fetch($sql3)){
if($r3['islast']) $sonclass =$sonclass.$r3['classid'].'|';
else{
$sql4=$empire->query("select classid,islast from {$dbtbpre}enewsclass where bclassid = $r3[classid]");
while($r4=$empire->fetch($sql4)){
if($r4['islast']) $sonclass =$sonclass.$r4['classid'].'|';
}
}
}
}
}
}
}
//echo "<br>".'子类栏目'.'|'.$sonclass."<br>";
if($sonclass){
$sonclass = '|'.$sonclass;
}else{ } if($empire->query("update {$dbtbpre}enewsclass set sonclass = '$sonclass' where classid = $r[classid]")){
echo $r['classid'].'更新成功<br>';
}
else echo $r['classid'].'更新失败~~~~~~~~~<br>'; }
else{ //echo ' --终极栏目'."<br>";
}
} db_close(); //关闭MYSQL链接
$empire=null; //注消操作类变量
?>
4.更新栏目lastclas字段(dede每个栏目都可添加文章,帝国只有终极栏目才可添加文章)(默认把原dede的最后一级转为终极栏目)
<?php
require('e/class/connect.php'); //引入数据库配置文件和公共函数文件
require('e/class/db_sql.php'); //引入数据库操作文件
$link=db_connect(); //连接MYSQL
$empire=new mysqlquery(); //声明数据库操作类 $sql=$empire->query("select classid,bclassid from {$dbtbpre}enewsclass");
$end = array();
while($r=$empire->fetch($sql))
{
$sql1=$empire->query("select classid from {$dbtbpre}enewsclass where bclassid = $r[classid]");
if(!$empire->fetch($sql1)){
if($empire->query("update {$dbtbpre}enewsclass set islast=1 where classid = $r[classid]"))
{
echo $r['classid'].'更新成功<br>';
}else echo $r['classid'].'--------------更新失败<br>';
}
} db_close(); //关闭MYSQL链接
$empire=null; //注消操作类变量
?>
5.转换文章
insert into ak_ecms_news (id,classid,truetime,onclick,title,titlepic,filename,newstime,lastdotime,smalltext,keyboard) select id,typeid,sortrank,click,title,litpic,filename,pubdate,senddate,description,keywords from dede_archives; insert into ak_ecms_news_data_1 (id,classid,newstext,newstempid) select aid,typeid,body,1 from dede_addonarticle; insert into ak_ecms_news_index (id,classid,checked,truetime,newstime,lastdotime) select id,typeid,1,sortrank,pubdate,senddate from dede_archives;
6.栏目全部动态
update ak_enewsclass set showdt=2 ,listdt=1,nreclass=1,nreinfo=1;
7.帝国后台更新

帝国数据字典:http://www.phome.net/doc/manual/extend/html/dbdoc/index.html
dede 转 帝国的更多相关文章
- We7——很有意思的一个开源CMS
目前做门户.做网站,基本上都需要用到一个系统,那就是CMS内容管理系统:现在开源产品有很多,笔者也是从事这个行业的,国内的各大CMS提供商基本上都试用过,今天向大家推荐一款很有意思的产品——We7CM ...
- DEDEcms和帝国cms的几点比较
前言:最近有很多人问我DEDEcms和帝国cms哪个比较好,我之前用2个都做过站的,所以能够说出它们大体的区别. 声明:我在此说明的是我一贯用的两种建站体统的感受,没有诋毁或者提升哪个系统!两个系统都 ...
- dede标签大全
想必很多人对后台不熟悉,并且觉得很难.其实不难,只是你们没有找到合适的方法学习而已!只有找到一个合适的学习方法,不管做什么事情,我想都很容易.学习讲究的是效率,而效率又是由思路决定的.就拿网页制作来说 ...
- 帝国CMS7.5后台美化模板 后台风格修改 帝国CMS后台模板
都知道帝国CMS功能强悍,生成静态html也非常好用.可是有时候他的后台样式,丑的让你不想用,dede呢,漏洞太多,PHPCMS好看,可是门槛要求高,你会写PHP才行. 帝国CMS后台美化模板:全面美 ...
- 帝国cms 7.5版列表页分页样式修改笔记
最近在用帝国改版我的个人博客站点,这个也是我第一次尝试用帝国来做博客,之前用过wordpress,每用一个新的程序,都会有些新的收获,也会学到一些新的东西. 在改用帝国之前,我也在网上大概了解了一下, ...
- spring帝国-开篇
spring简介: spring是一个开源框架,spring是于2003 年兴起的一个轻量级的Java 开发框架,由Rod Johnson 在其著作Expert One-On-One J2EE Dev ...
- 【NLP】Python NLTK 走进大秦帝国
Python NLTK 走进大秦帝国 作者:白宁超 2016年10月17日18:54:10 摘要:NLTK是由宾夕法尼亚大学计算机和信息科学使用python语言实现的一种自然语言工具包,其收集的大量公 ...
- 织梦多语言站点,{dede:include filename=''/}引入问题
织梦模板include插入非模板目录文件出现"无法在这个位置找到"错误的解决办法 以下是dede V55_UTF8 查dede include标签手册 (3) include 引入 ...
- dede织梦批量导入关键词
在后台替换对应的文件件即可. 注意:如果你的关键字长度超过16个字符的话,需要更改 dede 中 keywords 表中的keyword 字段字符长度 article_keywords_main.ph ...
随机推荐
- ARM应用调试思路、方法总结、笔记
一.应用调试1:使用strace命令来跟踪系统调用 二.应用调试2:使用GDB来调试应用程序 编译gdb,gdbservertar xjf gdb-7.4.tar.bz2cd gdb-7.4/./co ...
- 查询被收录页面中的死链接 By SEO
朋友说他的站挂了,想知道被收录的页面有多少是死链,于是我就想了一下流程,从Site获得收录数量当然是不精准的,不过也没有更好的地了,真实的收录只有搜索引擎数据库里面才有... 查询被收录页面的状态码, ...
- mysql 初始化修改密码问题(Mac系统)
今天公司大牛帮我搞定了mysql初始化密码问题,纪录一下: ~ ps aux | grep mysqlMetro 7149 0.0 0.0 2432772 564 s000 R+ 7:16下午 0:0 ...
- 13.hibernate的native sql查询(转自xiaoluo501395377)
hibernate的native sql查询 在我们的hibernate中,除了我们常用的HQL查询以外,还非常好的支持了原生的SQL查询,那么我们既然使用了hibernate,为什么不都采用hi ...
- ftp资源调用迅雷下载
<script src='http://pstatic.xunlei.com/js/webThunderDetect.js'></script> <script src= ...
- jquery.validate.js 无法验证隐藏域
隐藏域中的字段无法验证解决办法 修改 jquery.validate.js 中的 ignore: ":hidden",
- nmon性能统计工具使用-初认识
1.概述 监控,在检查系统问题或优化系统性能工作上是一个不可缺少的部分.通过操作系统监控工具监视操作系统资源的使用情况,间接地反映了各服务器程序的运行情况.根据运行结果分析可以帮助我们快速定位系统问题 ...
- MBProgressHUD详解
1,MBProgressHUD常用属性和用法Demo - (void)testMBProgressHUD { NSLog(@"test MBProgressHUD "); /* 要 ...
- 【Machine Learning in Action --4】朴素贝叶斯从个人广告中获取区域倾向
背景:广告商往往想知道关于一个人的一些特定人口统计信息,以便能更好地定向推销广告. 我们将分别从美国的两个城市中选取一些人,通过分析这些人发布的信息,来比较这两个城市的人们在广告用词上是否不同.如果结 ...
- jquery ui sortable 实现table,row的拖动。(Make Table Rows Sortable Using jQuery UI Sortable)
// Return a helper with preserved width of cells var fixHelper = function(e, ui) { //console.log(ui) ...