日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 >

phpcms毛遂

發(fā)布時間:2023/12/10 46 豆豆
生活随笔 收集整理的這篇文章主要介紹了 phpcms毛遂 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
1.showmessage()showmessage(L('operation_success'),'?m=link&c=link&a=edit','', 'edit');edit==>關(guān)閉對象showmessage(L('operation_failure'));showmessage(L('operation_false'),HTTP_REFERER);2.formValidator3.update()$data=array('nickname'=>$_POST['nickname'],'contact'=>$_POST['contact'],'content'=>$_POST['content'],'posttime'=>time(),'checkinfo'=>$checkinfo);$result=$this->db->update($data,"id={$id}");$result=$this->db->delete("id={$_GET['id']}");$insert_id=$this->db->insert($data,true);4.數(shù)據(jù)表名5.listinfo()6.對話框function edit(id) {window.top.art.dialog({id:'edit'}).close();window.top.art.dialog({title:'編輯留言'+' ',id:'edit',iframe:'?m=board&c=board&a=edit&id='+id,width:'700',height:'450'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});}function replay(id) {window.top.art.dialog({id:'replay'}).close();window.top.art.dialog({title:'回復(fù)留言'+' ',id:'replay',iframe:'?m=board&c=board&a=replay&id='+id,width:'450',height:'200'}, function(){var d = window.top.art.dialog({id:'replay'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'replay'}).close()});}7.改變狀態(tài)的ajax//傳id和值function check(id,checkinfo){$.ajax({type:"get",url:"?m=board&c=board&a=check",data:{id:id,checkinfo:checkinfo},dataType:"json",success:function(data){window.location="?m=board&c=board&a=init";}})}public function check(){if($_GET['checkinfo']=="true"){$checkinfo="false";}else{$checkinfo="true";}$data=array("checkinfo"=>$checkinfo);$result=$this->db->update($data,"id={$_GET['id']}");if($result){echo "1";}}7.刪除全部<a href='?m=board&c=board&a=delete&id=<?php echo $info['id']?>' onClick="return confirm('<?php echo L('confirm', array('message' =>$info['id']))?>')">刪除</a> public function delete(){if(!is_array($_POST['id'])){$result=$this->db->delete("id={$_GET['id']}");if($result){showmessage(L('operation_success'),HTTP_REFERER);}else{showmessage(L('operation_failure'),HTTP_REFERER);}}else{foreach($_POST['id'] as $k=>$smple_id){$result=$this->db->delete("id={$smple_id}");if(!$result){showmessage(L('operation_failure'),HTTP_REFERER);}}showmessage(L('operation_success'),HTTP_REFERER);}}8.排序<input name="dosubmit" type="submit" class="button" onClick="document.myform.action='?m=board&c=board&a=listorder'" value="<?php echo L('listorder')?>">//更新排序public function listorder() {if(isset($_POST['dosubmit'])) {foreach($_POST['listorders'] as $id => $orderid) {$orderid= intval($orderid);$this->db->update(array('orderid'=>$orderid),array('id'=>$id));}showmessage(L('operation_success'),HTTP_REFERER);} }

?

總結(jié)

以上是生活随笔為你收集整理的phpcms毛遂的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。