BVB Source Codes

Shandong kernel enterprise stand the source code Show catalog_do.php Source code

Return Download Shandong kernel enterprise stand the source code: download catalog_do.php Source code - Download Shandong kernel enterprise stand the source code Source code - Type:.php
  1. <?php
  2. require_once(dirname(__FILE__).'/config.php');
  3. if(empty($dopost))
  4. {
  5.         ShowMsg("对不起,请指定栏目参数!","catalog_main.php");
  6.         exit();
  7. }
  8. $cid = empty($cid) ? 0 : intval($cid);
  9. $channelid = empty($channelid) ? 0 : intval($channelid);
  10.  
  11. /*--------------------------
  12. //增加文档
  13. function addArchives();
  14. ---------------------------*/
  15. if($dopost=="addArchives")
  16. {
  17.         //默认文章调用发布表单
  18.         if(empty($cid) && empty($channelid))
  19.         {
  20.                 header("location:article_add.php");
  21.                 exit();
  22.         }
  23.         if(!empty($channelid))
  24.         {
  25.                 //根据模型调用发布表单
  26.                 $row = $dsql->GetOne("Select addcon from #@__channeltype where id='$channelid'");
  27.         }
  28.         else
  29.         {
  30.                 //根据栏目调用发布表单
  31.                 $row = $dsql->GetOne("Select ch.addcon from `#@__arctype` tp left join `#@__channeltype` ch on ch.id=tp.channeltype where tp.id='$cid' ");
  32.         }
  33.         $gurl = $row["addcon"];
  34.         if($gurl=="")
  35.         {
  36.                 ShowMsg("对不起,你指的栏目可能有误!","catalog_main.php");
  37.                 exit();
  38.         }
  39.  
  40.         //跳转并传递参数
  41.         header("location:{$gurl}?channelid={$channelid}&cid={$cid}");
  42.         exit();
  43. }
  44.  
  45. /*--------------------------
  46. //管理文档
  47. function listArchives();
  48. ---------------------------*/
  49. else if($dopost=="listArchives")
  50. {
  51.         if(!empty($gurl))
  52.         {
  53.                 if(empty($arcrank))
  54.                 {
  55.                         $arcrank = '';
  56.                 }
  57.                 $gurl = str_replace('..','',$gurl);
  58.                 header("location:{$gurl}?arcrank={$arcrank}&cid={$cid}");
  59.                 exit();
  60.         }
  61.         if($cid>0)
  62.         {
  63.                 $row = $dsql->GetOne("Select #@__arctype.typename,#@__channeltype.typename as channelname,#@__channeltype.id,#@__channeltype.mancon from #@__arctype left join #@__channeltype on #@__channeltype.id=#@__arctype.channeltype where #@__arctype.id='$cid'");
  64.                 $gurl = $row["mancon"];
  65.                 $channelid = $row["id"];
  66.                 $typename = $row["typename"];
  67.                 $channelname = $row["channelname"];
  68.                 if($gurl=="")
  69.                 {
  70.                         ShowMsg("对不起,你指的栏目可能有误!","catalog_main.php");
  71.                         exit();
  72.                 }
  73.         }
  74.         else if($channelid>0)
  75.         {
  76.  
  77.                 $row = $dsql->GetOne("Select typename,id,mancon from #@__channeltype where id='$channelid'");
  78.                 $gurl = $row["mancon"];
  79.                 $channelid = $row["id"];
  80.                 $typename = "";
  81.                 $channelname = $row["typename"];
  82.         }
  83.        
  84.         if(empty($gurl))
  85.         {
  86.                 $gurl = 'content_list.php';
  87.         }
  88.         header("location:{$gurl}?channelid={$channelid}&cid={$cid}");
  89.         exit();
  90. }
  91.  
  92. /*--------------------------
  93. //浏览通用模板目录
  94. function viewTempletDir();
  95. ---------------------------*/
  96. else if($dopost=="viewTemplet")
  97. {
  98.         header("location:tpl.php?path=/".$cfg_df_style);
  99.         exit();
  100. }
  101.  
  102. /*--------------------------
  103. //留言簿管理
  104. function GoGuestBook();
  105. ---------------------------*/
  106. else if($dopost=="guestbook")
  107. {
  108.         ShowMsg("正在跳转到留言本&gt;&gt;", "{$cfg_phpurl}/guestbook.php?gotopagerank=admin");
  109.         exit();
  110. }
  111.  
  112. /*------------------------
  113. 浏览单个页面的栏目
  114. function ViewSgPage()
  115. ------------------------*/
  116. else if($dopost=="viewSgPage")
  117. {
  118.         require_once(DEDEINC."/arc.listview.class.php");
  119.         $lv = new ListView($cid);
  120.         $pageurl = $lv->MakeHtml();
  121.         ShowMsg("更新缓冲,请稍后...",$pageurl);
  122.         exit();
  123. }
  124.  
  125. /*------------------------
  126. 更改栏目排列顺序
  127. function upRank()
  128. ------------------------*/
  129. else if($dopost=="upRank")
  130. {
  131.         //检查权限许可
  132.         CheckPurview('t_Edit,t_AccEdit');
  133.  
  134.         //检查栏目操作许可
  135.         CheckCatalog($cid,"你无权更改本栏目!");
  136.         $row = $dsql->GetOne("Select reid,sortrank From #@__arctype where id='$cid'");
  137.         $reid = $row['reid'];
  138.         $sortrank = $row['sortrank'];
  139.         $row = $dsql->GetOne("Select sortrank From #@__arctype where sortrank<=$sortrank And reid=$reid order by sortrank desc ");
  140.         if(is_array($row))
  141.         {
  142.                 $sortrank = $row['sortrank']-1;
  143.                 $dsql->ExecuteNoneQuery("update #@__arctype set sortrank='$sortrank' where id='$cid'");
  144.         }
  145.         UpDateCatCache();
  146.         ShowMsg("操作成功,返回目录...","catalog_main.php");
  147.         exit();
  148. }
  149. else if($dopost=="upRankAll")
  150. {
  151.         //检查权限许可
  152.         CheckPurview('t_Edit');
  153.         $row = $dsql->GetOne("Select id From #@__arctype order by id desc");
  154.         if(is_array($row))
  155.         {
  156.                 $maxID = $row['id'];
  157.                 for($i=1;$i<=$maxID;$i++)
  158.                 {
  159.                         if(isset(${'sortrank'.$i}))
  160.                         {
  161.                                 $dsql->ExecuteNoneQuery("Update #@__arctype set sortrank='".(${'sortrank'.$i})."' where id='{$i}';");
  162.                         }
  163.                 }
  164.         }
  165.         UpDateCatCache();
  166.         ShowMsg("操作成功,正在返回...","catalog_main.php");
  167.         exit();
  168. }
  169.  
  170. /*--------------------------
  171. //更新栏目缓存
  172. function UpCatlogCache();
  173. ---------------------------*/
  174. else if($dopost=="upcatcache")
  175. {
  176.         UpDateCatCache();
  177.         $sql = " TRUNCATE TABLE `#@__arctiny`";
  178.         $dsql->executenonequery($sql);
  179.        
  180.         //导入普通模型微数据
  181.         $sql = "insert into `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid)  
  182.                 Select id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid from `#@__archives` ";
  183.         $dsql->executenonequery($sql);
  184.        
  185.         //导入单表模型微数据
  186.         $dsql->SetQuery("Select id,addtable From `#@__channeltype` where id < -1 ");
  187.         $dsql->Execute();
  188.         $doarray = array();
  189.         while($row = $dsql->GetArray())
  190.         {
  191.                 $tb = str_replace('#@__', $cfg_dbprefix, $row['addtable']);
  192.                 if(empty($tb) || isset($doarray[$tb]) )
  193.                 {
  194.                         continue;
  195.                 }
  196.                 else
  197.                 {
  198.                         $sql = "insert into `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid)  
  199.                                 Select aid, typeid, 0, arcrank, channel, senddate, 0, mid from `$tb` ";
  200.                         $rs = $dsql->executenonequery($sql);
  201.                         $doarray[$tb]  = 1;
  202.                 }
  203.         }
  204.        
  205.         ShowMsg("操作成功,正在返回...","catalog_main.php");
  206.         exit();
  207. }
  208.  
  209. /*---------------------
  210. 获取JS文件
  211. function GetJs
  212. ----------------------*/
  213. else if($dopost=="GetJs")
  214. {
  215.         header("location:makehtml_js.php");
  216.         exit();
  217. }
  218.  
  219. /*-----------
  220. 获得子类的内容
  221. function GetSunListsMenu();
  222. -----------*/
  223. else if($dopost=="GetSunListsMenu")
  224. {
  225.         $userChannel = $cuserLogin->getUserChannel();
  226.         require_once(DEDEINC."/typeunit.class.menu.php");
  227.         AjaxHead();
  228.         PutCookie('lastCidMenu',$cid,3600*24,"/");
  229.         $tu = new TypeUnit($userChannel);
  230.         $tu->LogicListAllSunType($cid," ");
  231. }
  232.  
  233. /*-----------
  234. 获得子类的内容
  235. function GetSunLists();
  236. -----------*/
  237. else if($dopost=="GetSunLists")
  238. {
  239.         require_once(DEDEINC."/typeunit.class.admin.php");
  240.         AjaxHead();
  241.         PutCookie('lastCid',$cid,3600*24,"/");
  242.         $tu = new TypeUnit();
  243.         $tu->dsql = $dsql;
  244.         echo "    <table width='100%' border='0' cellspacing='0' cellpadding='0'>\r\n";
  245.         $tu->LogicListAllSunType($cid," ");
  246.         echo "    </table>\r\n";
  247.         $tu->Close();
  248. }
  249. /*----------------
  250. 合并栏目
  251. function unitCatalog() { }
  252. -----------------*/
  253. else if($dopost == 'unitCatalog')
  254. {
  255.         CheckPurview('t_Move');
  256.         require_once(DEDEINC.'/oxwindow.class.php');
  257.         require_once(DEDEINC.'/typelink.class.php');
  258.         require_once(DEDEINC.'/channelunit.func.php');
  259.         if(empty($nextjob))
  260.         {
  261.                 $typeid = isset($typeid) ? intval($typeid) : 0;
  262.                 $row = $dsql->GetOne("Select count(*) as dd From `#@__arctype` where reid='$typeid' ");
  263.                 $tl = new TypeLink($typeid);
  264.                 $typename = $tl->TypeInfos['typename'];
  265.                 $reid = $tl->TypeInfos['reid'];
  266.                 $channelid = $tl->TypeInfos['channeltype'];
  267.                 if(!empty($row['dd']))
  268.                 {
  269.                         ShowMsg("栏目: $typename($typeid) 有子栏目,不能进行合并操作!", '-1');
  270.                         exit();
  271.                 }
  272.                 $typeOptions = $tl->GetOptionArray(0, 0, $channelid);
  273.                 $wintitle = '合并栏目';
  274.                 $wecome_info = "<a href='catalog_main.php'>栏目管理</a> &gt;&gt; 合并栏目";
  275.                 $win = new OxWindow();
  276.                 $win->Init('catalog_do.php', 'js/blank.js', 'POST');
  277.                 $win->AddHidden('dopost', 'unitCatalog');
  278.                 $win->AddHidden('typeid', $typeid);
  279.                 $win->AddHidden('channelid', $channelid);
  280.                 $win->AddHidden('nextjob', 'unitok');
  281.                 $win->AddTitle("合并目录时不会删除原来的栏目目录,合并后需手动更新目标栏目的文档HTML和列表HTML。");
  282.                 $win->AddItem('你选择的栏目是:', "<font color='red'>$typename($typeid)</font>");
  283.                 $win->AddItem('你希望合并到那个栏目?', "<select name='unittype'>\r\n{$typeOptions}\r\n</select>");
  284.                 $win->AddItem('注意事项:', '栏目不能有下级子栏目,只允许子级到更高级或同级或不同父级的情况。');
  285.                 $winform = $win->GetWindow('ok');
  286.                 $win->Display();
  287.                 exit();
  288.         }
  289.         else
  290.         {
  291.                 if($typeid==$unittype)
  292.                 {
  293.                         ShowMsg("天哪,同一栏目如何合并,不是欺负人嘛!", '-1');
  294.                         exit();
  295.                 }
  296.                 if(IsParent($unittype, $typeid))
  297.                 {
  298.                         ShowMsg('不能从父类合并到子类!', 'catalog_main.php');
  299.                         exit();
  300.                 }
  301.                 $row = $dsql->GetOne("Select addtable From `#@__channeltype` where id='$channelid' ");
  302.                 $addtable = (empty($row['addtable']) ? '#@__addonarticle' : $row['addtable'] );
  303.                 $dsql->ExecuteNoneQuery("Update `#@__arctiny` set typeid='$unittype' where typeid='$typeid' ");
  304.                 $dsql->ExecuteNoneQuery("Update `#@__feedback` set typeid='$unittype' where typeid='$typeid' ");
  305.                 $dsql->ExecuteNoneQuery("Update `#@__archives` set typeid='$unittype' where typeid='$typeid' ");
  306.                 $dsql->ExecuteNoneQuery("Update `#@__archives` set typeid2='$unittype' where typeid2='$typeid' ");
  307.                 $dsql->ExecuteNoneQuery("Update `#@__addonspec` set typeid='$unittype' where typeid='$typeid' ");
  308.                 $dsql->ExecuteNoneQuery("Update `$addtable` set typeid='$unittype' where typeid='$typeid' ");
  309.                 $dsql->ExecuteNoneQuery("Delete From `#@__arctype` where id='$typeid' ");
  310.                 UpDateCatCache();
  311.                 ShowMsg('成功合并指定栏目!', 'catalog_main.php');
  312.                 exit();
  313.         }
  314. }
  315. /*----------------
  316. 移动栏目
  317. function moveCatalog() { }
  318. -----------------*/
  319. else if($dopost == 'moveCatalog')
  320. {
  321.         CheckPurview('t_Move');
  322.         require_once(DEDEINC.'/oxwindow.class.php');
  323.         require_once(DEDEINC.'/typelink.class.php');
  324.         require_once(DEDEINC.'/channelunit.func.php');
  325.         if(empty($nextjob))
  326.         {
  327.                 $tl = new TypeLink($typeid);
  328.                 $typename = $tl->TypeInfos['typename'];
  329.                 $reid = $tl->TypeInfos['reid'];
  330.                 $channelid = $tl->TypeInfos['channeltype'];
  331.                 $typeOptions = $tl->GetOptionArray(0,0,$channelid);
  332.                 $wintitle = "移动栏目";
  333.                 $wecome_info = "<a href='catalog_main.php'>栏目管理</a> &gt;&gt; 移动栏目";
  334.                 $win = new OxWindow();
  335.                 $win->Init('catalog_do.php', 'js/blank.js', 'POST');
  336.                 $win->AddHidden('dopost', 'moveCatalog');
  337.                 $win->AddHidden('typeid', $typeid);
  338.                 $win->AddHidden('channelid', $channelid);
  339.                 $win->AddHidden('nextjob', 'unitok');
  340.                 $win->AddTitle("移动目录时不会删除原来已创建的列表,移动后需重新对栏目创建HTML。");
  341.                 $win->AddItem('你选择的栏目是:',"$typename($typeid)");
  342.                 $win->AddItem('你希望移动到那个栏目?',"<select name='movetype'>\r\n<option value='0'>移动为顶级栏目</option>\r\n$typeOptions\r\n</select>");
  343.                 $win->AddItem('注意事项:','不允许从父级移动到子级目录,只允许子级到更高级或同级或不同父级的情况。');
  344.                 $winform = $win->GetWindow('ok');
  345.                 $win->Display();
  346.                 exit();
  347.         }
  348.         else
  349.         {
  350.                 if($typeid==$movetype)
  351.                 {
  352.                         ShowMsg('移对对象和目标位置相同!', 'catalog_main.php');
  353.                         exit();
  354.                 }
  355.                 if(IsParent($movetype, $typeid))
  356.                 {
  357.                         ShowMsg('不能从父类移动到子类!', 'catalog_main.php');
  358.                         exit();
  359.                 }
  360.                 $dsql->ExecuteNoneQuery(" Update `#@__arctype` set reid='$movetype' where id='$typeid' ");
  361.                 UpDateCatCache();
  362.                 ShowMsg('成功移动目录!', 'catalog_main.php');
  363.                 exit();
  364.         }
  365. }
  366. ?>
downloadcatalog_do.php Source code - Download Shandong kernel enterprise stand the source code Source code
Related Source Codes/Software:
Dede V2.2 dance music program - This system is based on DEDE5.7 sp1 production dan... 2016-11-11
Search engine v1.0 eight grams of novels - This program consists of WEB side and collection p... 2016-11-11
A thief free Jacky novel CMS, support for multiple station collection, support pseudo original SEO - A thief free Jacky novel CMS, support for multiple... 2016-11-11
Kunlun lubricating oil companies stand the source code - Just testing, free, source code is very beautiful ... 2016-11-11
Imitation of Chinese stationmaster net source dreams to 5.7 sp1 source code - Exactly the same and the Director of China network... 2016-11-11
Newscoop CMS v4.0.4 multilingual version - Newscoop is a content management system is mainly ... 2016-11-11
Ku978 navigator free send you department (with acquisition module) - Is I purchase the commercial version of this progr... 2016-11-11
Think of concise message this v1.1 - Wisdom of concise message this V1.1 main functions... 2016-11-11
nvidia-docker - Build and run Docker containers leveraging NVIDIA ... 2017-04-08
quickstart - Angular 2 QuickStart - source from the documentati... 2017-04-08
jQuery-Autocomplete - Ajax Autocomplete for jQuery allows you to easily ... 2017-04-08
Android-Best-Practices - Android best practice examples 2017-04-08
Bootstrap-Admin-Template - Metis - Free Bootstrap Admin Dashboard Template ... 2017-04-08
CocoaSPDY - SPDY for iOS and OS X 2017-04-08
parse-dashboard - A dashboard for managing your Parse apps that aren... 2017-04-08
HoloEverywhere - NO LONGER MAINTAINED. DEVELOP FOR 4.X+ DUDE. 2017-04-08
side-comments - [UNMAINTAINED] An interface component to give your... 2017-04-08
SVG-Morpheus - JavaScript library enabling SVG icons to morph fro... 2017-04-08

 Back to top