<strike id="th79n"></strike>

      <form id="th79n"></form>
      <address id="th79n"><listing id="th79n"><menuitem id="th79n"></menuitem></listing></address>

      <address id="th79n"><listing id="th79n"><meter id="th79n"></meter></listing></address>

            <address id="th79n"></address>
            網站資訊 news
            您現在的位置:首頁 > 網站資訊 > 織夢網站后臺增加復制文檔功能
            NEWS

            新聞資訊

            • 一文看懂Web3.0:元宇宙的基礎設施,三大標簽顛覆互聯網
              2022/07/26

              Web3.0:用戶主導的全新網絡生態。 Web3(也被稱為Web 3.0,又寫為web3)是關于萬維網發展的一個概念,主要與基于區塊鏈的去...

            • 百度編輯器ueditor在PHP7下多圖上傳名字重復問題
              2022/06/24

              百度編輯器ueditor在PHP7下多圖上傳名字重復,PbootCMS在V1.3.8已經修復,現在記錄如下,方便有類似情況的網友參考: 1、修改...

            • PBPHP V1.3 PHP集成運行環境
              2022/06/24

              系統簡介: 本集成環境為nginx+php,支持sqlite數據庫、支持PbootCMS偽靜態! 下載地址: 鏈接:?https://pan.baidu.com/s/1qs...

            • 2022開源免費CMS建站系統怎么選擇?
              2022/06/24

              隨著互聯網及web應用技術的快速發展,如今的網站建設已經發生了很大變化,不再像過去那樣一個980px網站即可完成,如今什么響...

            • SEO優化之扁平化目錄結構
              2022/06/24

              在網站內部優化中,扁平化的目錄結構對于一個網站來講是非常有意義的。我們經??吹揭恍┚W站結構混亂,搞的你都不知道哪里是...

            • PbootCMS自定義前臺404錯誤頁面
              2022/06/24

              PbootCMS已經內置支持自定義內容地址錯誤情況下錯誤頁面的自定義功能,只需要在站點根目錄下定義404.html文件即可,效果如下圖

            • PbootCMS靈活的多層級URL地址模式配置
              2022/06/24

              PbootCMS已經非常靈活的支持多層級URL地址模式,自定義包含如下情況: 1、欄目自定義:只需要在欄目的URL名稱中進行定義即可...

            織夢網站后臺增加復制文檔功能

            發布時間:2020/11/05 網站資訊 瀏覽次數:2152

            打開后臺目錄(/dede)下archives_do.php約430行下添加:

              1 /*-----------------------------
              2 //復制文檔
              3 ------------------------------*/
              4 elseif ($dopost == 'copyArchives') {
              5     CheckPurview('sys_ArcBatch');
              6     if (empty($totype)) {
              7         require_once(DEDEINC . '/typelink.class.php');
              8         if (!empty($aid) && empty($qstr)) $qstr = $aid;
              9  
             10         AjaxHead();
             11         $channelid = empty($channelid) ? 0 : $channelid;
             12         $tl = new TypeLink($aid);
             13         $typeOptions = $tl->GetOptionArray(0, $admin_catalogs, $channelid);
             14         $typeOptions = "<select name='totype' style='width:90%'>
             15         <option value='0'>請選擇復制到的位置...</option>\r\n
             16         $typeOptions
             17         </select>";
             18  
             19         //輸出AJAX可移動窗體
             20         $divname = 'copyArchives';
             21         echo "<div class='title' onmousemove=\"DropMoveHand('{$divname}', 225);\" onmousedown=\"DropStartHand();\" onmouseup=\"DropStopHand();\">\r\n";
             22         echo "    <div class='titLeft'>復制文檔</div>\r\n";
             23         echo "    <div class='titRight'><img src='images/ico-close.gif' style='cursor:pointer;' onclick='HideObj(\"{$divname}\");ChangeFullDiv(\"hide\");' alt='關閉' title='關閉' /></div>\r\n";
             24         echo "</div>\r\n";
             25         echo "<form name='quickeditform' action='archives_do.php' method='post'>\r\n";
             26         echo "<input type='hidden' name='dopost' value='{$dopost}' />\r\n";
             27         echo "<input type='hidden' name='qstr' value='{$qstr}' />\r\n";
             28         echo "<table width='100%' style='margin-top:6px;z-index:9000;'>\r\n";
             29         ?>
             30         <tr height='28'>
             31             <td width="80" class='bline'>?目標欄目:</td>
             32             <td class='bline'>
             33                 <?php echo $typeOptions; ?>
             34             </td>
             35         </tr>
             36         <tr height='32'>
             37             <td width="80" class='bline'>?文檔ID:</td>
             38             <td class='bline'>
             39                 <input type='text' name='tmpids' value="<?php echo $qstr; ?>" style='width:310px;overflow:hidden;'/>
             40                 <br/>
             41                 復制到的目標欄目必須和選定的文檔頻道類型一致,否則程序會自動勿略不符合的文檔。
             42             </td>
             43         </tr>
             44         <tr height='32'>
             45             <td colspan='2' align='center' style='padding-top:12px'>
             46                 <input name="imageField" type="image" src="images/button_ok.gif" width="60" height="22" class="np"
             47                        border="0" style="cursor:pointer"/>
             48                 ??
             49                 <img src="images/button_back.gif" width="60" height="22" border="0"
             50                      onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' style="cursor:pointer"/>
             51             </td>
             52             </td>
             53         </tr>
             54         </table>
             55         </form>
             56         <?php
             57         //AJAX窗體結束
             58     } else {
             59         $totype = preg_replace("#[^0-9]#", '', $totype);
             60         $typeInfos = $dsql->GetOne("SELECT tp.channeltype,tp.ispart,tp.channeltype,ch.maintable,ch.addtable,ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch on ch.id=tp.channeltype WHERE tp.id='$totype' ");
             61         $idtype = "id";
             62         if (!is_array($typeInfos)) {
             63             ShowMsg('參數錯誤!', '-1');
             64             exit();
             65         }
             66         if ($typeInfos['ispart'] != 0) {
             67             ShowMsg('文檔保存的欄目必須為最終列表欄目!', '-1');
             68             exit();
             69         }
             70         if (empty($typeInfos['addtable'])) {
             71             $typeInfos['maintable'] = '`#@__archives`';
             72         }
             73         //增加單表模型判斷
             74         if ($typeInfos['issystem'] == -1) {
             75             $typeInfos['maintable'] = $typeInfos['addtable'];
             76             $idtype = "aid";
             77         }
             78         $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr));
             79         $arc = '';
             80         $j = 0;
             81         $okids = array();
             82         $dsql->SetQuery("SELECT {$idtype},typeid FROM `{$typeInfos['maintable']}` WHERE {$idtype} in($arcids) AND channel='{$typeInfos['channeltype']}' ");
             83         $dsql->Execute();
             84         while ($row = $dsql->GetArray()) {
             85             if ($row['typeid'] != $totype) {
             86                 
             87                 $dsql->ExecuteNoneQuery("insert into `#@__arctiny` (typeid,typeid2,arcrank,channel,senddate,sortrank,mid) select typeid,typeid2,arcrank,channel,senddate,sortrank,mid from `#@__arctiny` where id='{$row[$idtype]}'");
             88                 
             89                 $xid = $dsql->GetLastID();
             90                 
             91                 $dsql->ExecuteNoneQuery("insert into `{$typeInfos['maintable']}`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,keywords,lastpost,scores,goodpost,badpost,voteid,notpost,description,filename,dutyadmin,tackid,mtype,weight) select case when id>'0' then '$xid'  else '' end, case when typeid>'0' then '$totype'  else '' end,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,keywords ,lastpost,scores,goodpost,badpost,voteid,notpost,description,filename,dutyadmin,tackid,mtype,weight from `{$typeInfos['maintable']}` WHERE id='{$row[$idtype]}' ");
             92                 
             93                 $dsql->ExecuteNoneQuery("insert into `{$typeInfos['addtable']}`(aid,typeid,body,redirecturl,templet,userip) select case when aid>'0' then '$xid'  else '' end,$totype,body,redirecturl,templet,userip from `{$typeInfos['addtable']}` WHERE aid='{$row[$idtype]}' ");
             94                 
             95                 $okids[] = $row[$idtype];
             96                 $j++;
             97             }
             98         }
             99  
            100         
            101     UpDateCatCache();
            102     $sql = " TRUNCATE TABLE `#@__arctiny`";
            103     $dsql->ExecuteNoneQuery($sql);
            104     
            105     //導入普通模型微數據
            106     $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid)  
            107             SELECT id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid FROM `#@__archives` ";
            108     $dsql->ExecuteNoneQuery($sql);
            109     
            110     //導入單表模型微數據
            111     $dsql->SetQuery("SELECT id,addtable FROM `#@__channeltype` WHERE id < -1 ");
            112     $dsql->Execute();
            113     $doarray = array();
            114     while($row = $dsql->GetArray())
            115     {
            116         $tb = str_replace('#@__', $cfg_dbprefix, $row['addtable']);
            117         if(empty($tb) || isset($doarray[$tb]) )
            118         {
            119             continue;
            120         }
            121         else
            122         {
            123             $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid)  
            124                     SELECT aid, typeid, 0, arcrank, channel, senddate, 0, mid FROM `$tb` ";
            125             $rs = $dsql->executenonequery($sql);
            126             $doarray[$tb]  = 1;
            127         }
            128     }
            129         //更新HTML
            130         foreach ($okids as $aid) {
            131             $arc = new Archives($aid);
            132             $arc->MakeHtml();
            133         }
            134         ShowMsg("成功復制 $j 個文檔!", $ENV_GOBACK_URL);
            135         exit();
            136     }
            137 }

             

            打開dede/js/list.js 搜索 function moveArc(e, obj, cid)下約35行添加

             1 function copyArc(e, obj, cid){
             2     var qstr=getCheckboxItem();
             3     if(qstr=='')
             4     {
             5         alert('必須選擇一個或多個文檔!');
             6         return;
             7     }
             8     LoadQuickDiv(e, 'archives_do.php?dopost=copyArchives&qstr='+qstr+'&channelid='+cid+'&rnd='+Math.random(), 'copyArchives', '450px', '180px');
             9     ChangeFullDiv('show');
            10 }

             

            打開dede/js/list.js 搜索??function ShowMenu(evt,obj,aid,atitle)里面的

            new ContextItem(“推薦文檔”,function(){ adArc(aid); }),的下面添加

            new ContextItem("復制(<u>C</u>)",function(){ copyToClipboard(atitle); }),

             

            打開dede/templets下的content_list.htm找到

            <a href=”javascript:;” onClick=”moveArc(event,this,<?php echo (empty($channelid) ? 0 : $channelid); ?>)” class=”layui-btn layui-btn-small”>&nbsp;移動&nbsp;</a>

            當前行的下方添加

            <a href="javascript:;" onClick="copyArc(event,this,<?php echo (empty($channelid) ? 0 : $channelid); ?>);" class="coolbg">?復制?</a>

             

            云風網絡是集昆山網站制作,昆山網頁設計,昆山網站推廣于一體的昆山網絡公司,業務涵蓋:昆山手機網站制作,昆山網站設計,昆山網絡建設,昆山做網站,昆山網站建設,電話:13912673321

            點擊這里給我發消息 技術咨詢
            回到頂部
            啊用力灬啊别停灬
            <strike id="th79n"></strike>

                <form id="th79n"></form>
                <address id="th79n"><listing id="th79n"><menuitem id="th79n"></menuitem></listing></address>

                <address id="th79n"><listing id="th79n"><meter id="th79n"></meter></listing></address>

                      <address id="th79n"></address>