Demo entry 6358431

php

   

Submitted by anonymous on Apr 25, 2017 at 10:37
Language: JavaScript+PHP. Code size: 1.3 kB.

function tpl_main($act,$fid,$tid,$sitepath,$p){
			$tpl_addr = $this->get_tpl($act);// template/informations.html
			$temp = $this->load_tpl($tpl_addr);//载入模板
			$temp = $this->get_include_file($temp);// 获取include 的文件
			$temp = $this->get_sys_tag($temp,$tid,$fid);// 获取sys标签
			$temp = $this->get_userlogin($temp,$fid,$tid,$p);
			$temp = $this->get_url_path($temp);

			//帖子置顶 加精 删除 操作
			switch($act){
				case "forum" :
					$temp = $this->get_intopthread_list($temp,$fid,$p);//获取置顶帖子
					$temp = $this->get_thread_list($temp,$fid,$p);//获取帖子列表
					break;
				case "thread" :
					$temp = $this->get_post_list($temp,$tid,$fid,$p,$act);
					$temp = $this->get_iflogin($temp,$tid,$fid,$p);
					break;
				case "del" :
					mysql_query(get_sql("update {pre}post set state = 0 where tid = '{$tid}'"));
					mysql_query(get_sql("update {pre}thread set state = 0 where tid = '{$tid}'"));
					echo "<script>alert('操作成功!');window.history.back();</script>";
					

					break;	
				default:
					$temp = $this->get_forum_list($temp,$p);
					break;
			}
			
			
			$temp = get_login_mess($temp);

			$temp = $this->get_sitepath($temp,$act,$fid,$tid,$p);//获取当前链接位置
			if ($id != ""){
				$temp = $this->get_content_content($temp,$id);
				$temp = $this->get_prv_next($temp,$id);
			}
			echo $temp;
		}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).