$("[name='mbigpic[]']").length $("[name='downmorepicnum']").val(4);
dopicadd()
1. 以下代码插入到标题字段的html代码里
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script> <script type="text/javascript" src="/e/extend/upword/ajaxfileupload.js"></script> <script src="/e/extend/upword/layer/layer.js"></script> <input id="fileToUpload" type="file" size="20" name="fileToUpload" class="input"> <input id="btnShow" type="button" value="上传txt文档" class="button" onclick="ajaxFileUpload()" /> <div id="form_submit"><input type="submit" id="message_submit" value="提交" /></div> <!--等待div--> <div id="pop" style="z-index:1;background-color:#CCCCCC;filter: alpha(opacity=80);width:100%;height:100%;position:absolute;left:0px;top:0px;display:none"> </div> <div id="loading" class="loading" style="display:none;">上传转换中,请稍等...</div>
2.标题化图片本地化:以下函数写到userfun.php中,然后titlepic字段函数里 写上 f_picurl
//标题图片的本地化 function f_picurl($mid,$f,$isadd,$isq,$value,$cs){ global $empire,$dbtbpre,$public_r; $picurl=$value; $classid=(int)$_POST['classid']; if(empty($picurl)||!$classid){ return $value; } $r=DoTranUrl($picurl,$classid); if(empty($r['tran'])){ return $value; } $r['filesize']=(int)$r['filesize']; $filepass=(int)$_POST['filepass']; $username='picurl'; $sql=eInsertFileTable($r['filename'],$r['filesize'],$r['filepath'],$username,$classid,$r['filename'],1,$filepass,$filepass,$public_r['fpath'],0,$modtype,$fstb); return $r['url']; }
|