日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網(wǎng)為廣大站長提供免費收錄網(wǎng)站服務,提交前請做好本站友鏈:【 網(wǎng)站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(50元/站),

點擊這里在線咨詢客服
新站提交
  • 網(wǎng)站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會員:747

一款基于webupload帝國cms后臺多圖集H5上傳插件

使用方法:

1、將webupload文件放到/e/extend/目錄下

2、新建字段uploadimg,將下面的代碼放入“輸入表單替換html代碼”中

3、修改一下兩個文件

打開/e/class/qinfofun.php文件找到

if($f=="morepic")//圖片集

在下面放入代碼

elseif($f=='uploadimg')
       {
        $add_temp = array(
             'msmallpic' => $add['msmalluploadimg'],
             'mbigpic'   => $add['mbiguploadimg'],
             'mpicname'  => $add['muploadimgname'],
             'mdelpicid' => $add['mdeluploadimgid'],
             'mpicid'    => $add['muploadimgid'],
             'mpicurl_qz'=> $add['muploadimgurl_qz'],
             'msavepic'  => $add['msaveuploadimg'],
             'mcreatespic'=> $add['mcreatesuploadimg'],
             'msmallpfile'=> $add['msmalluploadimgfile'],
             'mbigpfile'=> $add['mbiguploadimgfile'],
        );
        //設置_FIELS
        $_FILES['msmallpfile'] = $_FILES['msmalluploadimgpfile'];
        $_FILES['mbigpfile'] = $_FILES['mbiguploadimgpfile'];
        $add = array_merge($add,$add_temp);
        $value=ReturnMorepicpath($add['msmallpic'],$add['mbigpic'],$add['mpicname'],$add['mdelpicid'],$add['mpicid'],$add,$add['mpicurl_qz'],1,0,intval($add['fstb']));
    }

打開/e/class/functions.php文件找到

elseif($f=="morepic")//圖片集

在下面放入代碼(總共兩個位置分別放入)

elseif($f=='uploadimg')
               {
                $add_temp = array(
                     'msmallpic' => $add['msmalluploadimg'],
                     'mbigpic'   => $add['mbiguploadimg'],
                     'mpicname'  => $add['muploadimgname'],
                     'mdelpicid' => $add['mdeluploadimgid'],
                     'mpicid'    => $add['muploadimgid'],
                     'mpicurl_qz'=> $add['muploadimgurl_qz'],
                     'msavepic'  => $add['msaveuploadimg'],
                     'mcreatespic'=> $add['mcreatesuploadimg'],
                     'msmallpfile'=> $add['msmalluploadimgpfile'],
                     'mbigpfile'=> $add['mbiguploadimgpfile'],
                );
                //設置_FIELS
                $_FILES['msmallpfile'] = $_FILES['msmalluploadimgpfile'];
                $_FILES['mbigpfile'] = $_FILES['mbiguploadimgpfile'];
                $add = array_merge($add,$add_temp);
                $value=ReturnMorepicpath($add['msmallpic'],$add['mbigpic'],$add['mpicname'],$add['mdelpicid'],$add['mpicid'],$add,$add['mpicurl_qz'],1,0,intval($add['fstb']));
 
            }

最后新建好文章的圖集字段 字段命名為[ uploadimg ]

<link rel="stylesheet" type="text/css" href="<?=$public_r[newsurl]?>e/extend/webupload/webuploader.css" />
<link rel="stylesheet" type="text/css" href="<?=$public_r[newsurl]?>e/extend/webupload/style.css" />
<script type="text/javascript" src="<?=$public_r[newsurl]?>e/extend/webupload/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
    var mys="<?=$public_r[newsurl]?>e/extend/webupload/up.php";
    var myfileNumLimit=5;
    var myformData={'classid':'<?=$classid?>','filepass':'<?=$filepass?>'};
</script>
<div id="wrapper">
    <div id="container">
        <div id="uploader">
            <div class="queueList">
                <div id="dndArea" class="placeholder<?=$r[uploadimg]?' element-invisible':''?>">
                    <div id="filePicker"></div>
                    <p>點擊選擇圖片,單次最多可選5張</p>
                </div>
                <ul class="filelist" id="filelist0">
                    <?
                    if($r[uploadimg])
                    {
                        $r['uploadimg']=stripSlashes($r[uploadimg]);
                        $picarr=explode("\r\n",$r[uploadimg]);
                        $count=count($picarr);
                        for($i=0;$i<$count;$i++)
                        {
                            $j=$i+1;
                            $pic=explode("::::::",$picarr[$i]);
                            $checked=$pic[0]==$r[titlepic]?'checked':'';
                            $uploadimg.='<li class="delpic courseList">
                                <p class="title">'.$pic[2].'</p>
                                <p class="imgWrap"><img style="width:120px; height:90px;" src="'.$pic[0].'"><input type="hidden" name="mbiguploadimg[]" value="'.$pic[1].'" /><input type="hidden" name="msmalluploadimg[]" value="'.$pic[0].'" /><input type="text" id="muploadimgname" name="muploadimgname[]" value="'.$pic[2].'" /></p>
                                <div class="file-panel"><input type="radio" value="'.$pic[1].'" '.$checked.' name="setTitlepic" class="setTitlepic" />設為封面</div>
                                <span class="cancel">刪除</span>
                                <div class="moveud"><a class="moveUpBtn" href="javascript:;"><</a><a class="moveDownBtn" href="javascript:;">></a></div>
                            </li>';
                        }
                    }
                    echo $uploadimg;
                    ?>
                    <script>
                    //設置封面
                    $(document).on('click', '.setTitlepic', function(){
                        titlepic=$(this).val();
                        $("#titlepic").val(titlepic);
                    });
                    //動態(tài)刪除DOM添加的圖片
                    $(document).on('click', 'span.cancel', function(){
                        $(this).parents('.courseList').remove();
                    });
                    //靜態(tài)DOM設置封面
                    $(document).on('click', '.setTitlepic', function(){
                        titlepic=$(this).val();
                        $("#titlepic").val(titlepic);
                    });
                    //靜態(tài)刪除DOM添加的圖片
                    $(document).on('click', 'span.cancel', function(){
                        $(this).parents('.courseList').remove();
                    });
                     
                    $(document).on('click', '.moveDownBtn', function(){
                        //判斷是否有下一個節(jié)點
                        if($(this).parents('.courseList').nextAll().length > 0){
                            $(this).parents('.courseList').next().after($(this).parents('.courseList').prop('outerHTML'));
                            $(this).parents('.courseList').remove();
                        }
                        }).on('click', '.moveUpBtn', function(){
                        //判斷是否有上一個節(jié)點
                        if($(this).parents('.courseList').prevAll().length > 0){
                            $(this).parents('.courseList').prev().before($(this).parents('.courseList').prop('outerHTML'));
                            $(this).parents('.courseList').remove();
                        }
                    })
                     
                    </script>                 
                </ul>
            </div>
            <div class="statusBar" style="<?=$r[uploadimg]?'':'display:none;'?>">
                <div class="progress">
                    <span class="text">0%</span>
                    <span class="percentage"></span>
                </div>
                <div class="btns">
                    <div class="uploadBtn">開始上傳</div>
                    <div id="filePicker2"></div>
                </div>
                <div class="info"></div>
            </div>             
        </div>
    </div>
</div>
<script type="text/javascript" src="<?=$public_r[newsurl]?>e/extend/webupload/webuploader.min.js"></script>
<script type="text/javascript" src="<?=$public_r[newsurl]?>e/extend/webupload/upload.js"></script>
<script type="text/javascript">
$(function(){
    $("#filelist1").html($("#filelist0").html());
    $("#filelist0").remove();
})
</script>


分享到:
標簽:webupload上傳插件 帝國cms后臺 帝國cms多圖上傳插件
用戶無頭像

網(wǎng)友整理

注冊時間:

網(wǎng)站:5 個   小程序:0 個  文章:12 篇

  • 51998

    網(wǎng)站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會員

趕快注冊賬號,推廣您的網(wǎng)站吧!
最新入駐小程序

數(shù)獨大挑戰(zhàn)2018-06-03

數(shù)獨一種數(shù)學游戲,玩家需要根據(jù)9

答題星2018-06-03

您可以通過答題星輕松地創(chuàng)建試卷

全階人生考試2018-06-03

各種考試題,題庫,初中,高中,大學四六

運動步數(shù)有氧達人2018-06-03

記錄運動步數(shù),積累氧氣值。還可偷

每日養(yǎng)生app2018-06-03

每日養(yǎng)生,天天健康

體育訓練成績評定2018-06-03

通用課目體育訓練成績評定