BVB Source Codes

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

Return Download Shandong kernel enterprise stand the source code: download archives_edit.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. CheckRank(0,0);
  4. require_once(DEDEINC."/dedetag.class.php");
  5. require_once(DEDEINC."/customfields.func.php");
  6. require_once(DEDEMEMBER."/inc/inc_catalog_options.php");
  7. require_once(DEDEMEMBER."/inc/inc_archives_functions.php");
  8. $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 1;
  9. $aid = isset($aid) && is_numeric($aid) ? $aid : 0;
  10. $mtypesid = isset($mtypesid) && is_numeric($mtypesid) ? $mtypesid : 0;
  11. $menutype = 'content';
  12.  
  13. /*-------------
  14. function _ShowForm(){  }
  15. --------------*/
  16. if(empty($dopost))
  17. {
  18.         //读取归档信息
  19.         $arcQuery = "Select arc.*,ch.addtable,ch.fieldset,arc.mtype as mtypeid,ch.arcsta
  20.       From `#@__archives` arc left join `#@__channeltype` ch on ch.id=arc.channel
  21.       where arc.id='$aid' And arc.mid='".$cfg_ml->M_ID."'; ";
  22.         $row = $dsql->GetOne($arcQuery);
  23.         if(!is_array($row))
  24.         {
  25.                 ShowMsg("读取文档信息出错!","-1");
  26.                 exit();
  27.         }
  28.         else if($row['arcrank']>=0)
  29.         {
  30.                 $dtime = time();
  31.                 $maxtime = $cfg_mb_editday * 24 *3600;
  32.                 if($dtime - $row['senddate'] > $maxtime)
  33.                 {
  34.                         ShowMsg("这篇文档已经锁定,你不能再修改它!","-1");
  35.                         exit();
  36.                 }
  37.         }
  38.         $addRow = $dsql->GetOne("Select * From `{$row['addtable']}` where aid='$aid'; ");
  39.         $cInfos = $dsql->GetOne("Select * From `#@__channeltype`  where id='{$row['channel']}'; ");
  40.         include(DEDEMEMBER."/templets/archives_edit.htm");
  41.         exit();
  42. }
  43.  
  44. /*------------------------------
  45. function _SaveArticle(){  }
  46. ------------------------------*/
  47. else if($dopost=='save')
  48. {
  49.         include(DEDEMEMBER.'/inc/archives_check_edit.php');
  50.  
  51.         //分析处理附加表数据
  52.         $inadd_f = '';
  53.         if(!empty($dede_addonfields))
  54.         {
  55.                 $addonfields = explode(';',$dede_addonfields);
  56.                 if(is_array($addonfields))
  57.                 {
  58.                         foreach($addonfields as $v)
  59.                         {
  60.                                 if($v=='')
  61.                                 {
  62.                                         continue;
  63.                                 }else if($v == 'templet')
  64.                                 {
  65.                                         ShowMsg("你保存的字段有误,请检查!","-1");
  66.                                         exit();
  67.                                 }
  68.                                 $vs = explode(',',$v);
  69.                                 if(!isset(${$vs[0]}))
  70.                                 {
  71.                                         ${$vs[0]} = '';
  72.                                 }
  73.  
  74.                                 //自动摘要和远程图片本地化
  75.                                 if($vs[1]=='htmltext'||$vs[1]=='textdata')
  76.                                 {
  77.                                         ${$vs[0]} = AnalyseHtmlBody(${$vs[0]},$description,$vs[1]);
  78.                                 }
  79.  
  80.                                 ${$vs[0]} = GetFieldValueA(${$vs[0]},$vs[1],$aid);
  81.  
  82.                                 $inadd_f .= ','.$vs[0]." ='".${$vs[0]}."' ";
  83.                         }
  84.                 }
  85.         }
  86.  
  87.         //处理图片文档的自定义属性
  88.         if($litpic!='')
  89.         {
  90.                 $flag = 'p';
  91.         }
  92.  
  93.         //更新数据库的SQL语句
  94.         $upQuery = "Update `#@__archives` set
  95.              ismake='$ismake',
  96.              arcrank='$arcrank',
  97.              typeid='$typeid',
  98.              title='$title',
  99.              litpic='$litpic',
  100.              description='$description',
  101.              keywords='$keywords',  
  102.              mtype = '$mtypesid',        
  103.              flag='$flag'
  104.     where id='$aid' And mid='$mid'; ";
  105.         if(!$dsql->ExecuteNoneQuery($upQuery))
  106.         {
  107.                 ShowMsg("把数据保存到数据库主表时出错,请联系管理员!".$dsql->GetError(),"-1");
  108.                 exit();
  109.         }
  110.  
  111.         if($addtable!='')
  112.         {
  113.                 $upQuery = "Update `$addtable` set typeid='$typeid'{$inadd_f}, userip='$userip' where aid='$aid' ";
  114.                 if(!$dsql->ExecuteNoneQuery($upQuery))
  115.                 {
  116.                         ShowMsg("更新附加表 `$addtable`  时出错,请联系管理员!","javascript:;");
  117.                         exit();
  118.                 }
  119.         }
  120.         UpIndexKey($aid,$arcrank,$typeid,$sortrank,$tags);
  121.         $artUrl = MakeArt($aid,true);
  122.         if($artUrl=='')
  123.         {
  124.                 $artUrl = $cfg_phpurl."/view.php?aid=$aid";
  125.         }
  126.  
  127.         //返回成功信息
  128.         $msg = "  请选择你的后续操作:
  129.                 <a href='archives_add.php?cid=$typeid&channelid=$channelid'><u>发布新内容</u></a>
  130.                 &nbsp;&nbsp;
  131.                 <a href='archives_do.php?channelid=$channelid&aid=".$aid."&dopost=edit'><u>查看更改</u></a>
  132.                 &nbsp;&nbsp;
  133.                 <a href='$artUrl' target='_blank'><u>查看内容</u></a>
  134.                 &nbsp;&nbsp;
  135.                 <a href='content_list.php?channelid=$channelid'><u>管理内容</u></a>
  136.                 ";
  137.         $wintitle = "成功更改内容!";
  138.         $wecome_info = "内容管理::更改内容";
  139.         $win = new OxWindow();
  140.         $win->AddTitle("成功更改内容:");
  141.         $win->AddMsgItem($msg);
  142.         $winform = $win->GetWindow("hand","&nbsp;",false);
  143.         $win->Display();
  144. }
  145. ?>
downloadarchives_edit.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