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 转 帝国的更多相关文章

  1. We7——很有意思的一个开源CMS

    目前做门户.做网站,基本上都需要用到一个系统,那就是CMS内容管理系统:现在开源产品有很多,笔者也是从事这个行业的,国内的各大CMS提供商基本上都试用过,今天向大家推荐一款很有意思的产品——We7CM ...

  2. DEDEcms和帝国cms的几点比较

    前言:最近有很多人问我DEDEcms和帝国cms哪个比较好,我之前用2个都做过站的,所以能够说出它们大体的区别. 声明:我在此说明的是我一贯用的两种建站体统的感受,没有诋毁或者提升哪个系统!两个系统都 ...

  3. dede标签大全

    想必很多人对后台不熟悉,并且觉得很难.其实不难,只是你们没有找到合适的方法学习而已!只有找到一个合适的学习方法,不管做什么事情,我想都很容易.学习讲究的是效率,而效率又是由思路决定的.就拿网页制作来说 ...

  4. 帝国CMS7.5后台美化模板 后台风格修改 帝国CMS后台模板

    都知道帝国CMS功能强悍,生成静态html也非常好用.可是有时候他的后台样式,丑的让你不想用,dede呢,漏洞太多,PHPCMS好看,可是门槛要求高,你会写PHP才行. 帝国CMS后台美化模板:全面美 ...

  5. 帝国cms 7.5版列表页分页样式修改笔记

    最近在用帝国改版我的个人博客站点,这个也是我第一次尝试用帝国来做博客,之前用过wordpress,每用一个新的程序,都会有些新的收获,也会学到一些新的东西. 在改用帝国之前,我也在网上大概了解了一下, ...

  6. spring帝国-开篇

    spring简介: spring是一个开源框架,spring是于2003 年兴起的一个轻量级的Java 开发框架,由Rod Johnson 在其著作Expert One-On-One J2EE Dev ...

  7. 【NLP】Python NLTK 走进大秦帝国

    Python NLTK 走进大秦帝国 作者:白宁超 2016年10月17日18:54:10 摘要:NLTK是由宾夕法尼亚大学计算机和信息科学使用python语言实现的一种自然语言工具包,其收集的大量公 ...

  8. 织梦多语言站点,{dede:include filename=''/}引入问题

    织梦模板include插入非模板目录文件出现"无法在这个位置找到"错误的解决办法 以下是dede V55_UTF8 查dede include标签手册 (3) include 引入 ...

  9. dede织梦批量导入关键词

    在后台替换对应的文件件即可. 注意:如果你的关键字长度超过16个字符的话,需要更改 dede 中 keywords 表中的keyword 字段字符长度 article_keywords_main.ph ...

随机推荐

  1. Go-利用Map实现类似Python的Set数据结构

    该笔记参考<Go并发编程实战> 首先实现一个自定义的HashSet 利用interface{}作为键,布尔型作为值. package main import ( "bytes&q ...

  2. JAVA: 接入YSDK遇到的问题

    JAVA后台接口: 1, 腾讯开放平台: http://wiki.open.qq.com/wiki/%E9%A6%96%E9%A1%B5 2,YSDK介绍,大概流程: http://wiki.open ...

  3. MySQL5.5.28启动错误 The server quit without updating PID file

    今天重新安装了一次 MySQL5.5.28 ,但启动的时候老是报错 Starting MySQL.. ERROR! The server quit without updating PID file ...

  4. 纯CSS实现斜角

    今天看了看腾讯的七周年时光轴,发现这个斜角的CSS,研究了半天提出下面代码可以直接实现斜角,不是CSS3哦,那个就太容易了 -webkit-transform:rotate(10deg); 倾斜度后再 ...

  5. jQuery获取当前对象标签名称

    获取当前对象标签名称 $(".classname")[0].tagName;

  6. iOS中的base64加密

    #import <UIKit/UIKit.h> @interface Base64String : NSObject + (NSString *)base64String:(NSStrin ...

  7. 分享给大家一个简单的数据导出excel类

    <?php /** * 生成excel文件操作 * * @author wesley wu * @date 2013.12.9 */ class Excel { private $limit = ...

  8. 前台图片上传展示JS(单张图片展示)

    <script type="text/javascript">    //下面用于多图片上传预览功能    function setImagePreviews(aval ...

  9. ajax不进success,

    $.ajax({ url:"/order/pay_order_wx?order_id="+order_id, type:'GET', data:"{}", da ...

  10. HDU 1407 测试你是否和LTC水平一样高(枚举)

    测试你是否和LTC水平一样高 Problem Description 大家提到LTC都佩服的不行,不过,如果竞赛只有这一个题目,我敢保证你和他绝对在一个水平线上!你的任务是:计算方程x^2+y^2+z ...