HEX
Server: nginx/1.22.1
System: Linux VM-16-9-centos 3.10.0-1160.99.1.el7.x86_64 #1 SMP Wed Sep 13 14:19:20 UTC 2023 x86_64
User: www (1001)
PHP: 7.3.31
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.sanjiangapp.com/template/default/html/member/mycomment.html
{include file=comm/head.html}

{include file=comm/top.html}

<div class="container pages">

	{include file=comm/position.html}
	
	<div class="row mb-5">
	
        {include file=member/left.html}

        <div class="col-12 col-md-10 mt-3">			
			<table class="table">
			  <thead>
			  	<th>序号</th>
			  	<th>文章</th>
			  	<th>评论</th>
			  	<th>状态</th>
			  	<th>时间</th>
			  	<th>操作</th>
			  </thead>
			  <tbody>
			  	{pboot:mycomment num=10}
			    <tr>
			      <td>[mycomment:i]</td>
			      <td>[mycomment:title]</td>
			      <td>[mycomment:comment]</td>
			      <td>{pboot:if([mycomment:status]==1)}已审核{else}<span style="color:red">待审核</span>{/pboot:if}</td>
			      <td>[mycomment:date]</td>
			      <td><span class="del" data-url="[mycomment:delaction]" style="cursor:pointer" >删除</span></td>
			    </tr>
			    {/pboot:mycomment}
			  </tbody>
			</table>
			{include file=comm/page.html}
        </div>
   </div>
 
</div>

<script>
$(".del").on("click",function(){

	 if(!confirm("您确定要删除么?")){
		 return;
	 }
	 
	var url=$(this).data('url');
	var el=$(this).parents("tr");
	 $.ajax({
	    type: 'GET',
	    url: url,
	    dataType: 'json',
	    success: function (response, status) {
	    	if(response.code==0){
	    		alert(response.data);
	    	}else{
	    		el.remove();	
	    	}
	    },
	    error:function(xhr,status,error){
	      alert('返回数据异常!');
	    }
	  });
});
</script>

{include file=comm/foot.html}