Location: PHPKode > projects > infoboard > infoboard/_req/showtopic.php
<?
session_start();
include("../data/connect.php");
include("../data/_uconfig.php");
include("../_class/lang.php");
include("../_class/lang_".$iscon["getlang"].".php");

include("../_class/_func.php");
include("../_class/class.global.php");
include("../_class/class.req.php");

$infoboard = new req_infoboard();
$infoboard->checksess();
$infoboard->adminsess();

$infoboard->isconnect();

if(isset($_GET["action"])) $action=$_GET["action"]; else $action="";
$cid = $_GET["cid"];
$cat = $_GET["cat"];
$page = $_GET["page"];

		  switch($action){
		  case"topic";
		  if($infoboard->tbupdate("_infoboardq", "_active='1'", "_cid", $cid)){
			   $infoboard->updateproof("unproof", $cat, $page);
			   refurl($iscon["lang"][105], $_SERVER['HTTP_REFERER']);
		  }
		  break;
		  case"ans";

		  if($infoboard->tbupdate("_infoboarda", "_active='1'", "_cid", $cid)){

		      $query=mysql_db_query($infoboard->dbname, "select _name, _level, _userid, _time from _infoboarda where _cid='".$cid."'");
			  if($result = @mysql_fetch_array($query)){
				   $name = $result["_name"];
				   $level = $result["_level"];
				   $userid = $result["_userid"];
				   $time = $result["_time"];
			   }

			   $fieldupdate="
			   _reply=_reply+1,
			   _save='1',
			   _ansname='".$name."',
			   _anslevel='".$level."',
			   _ansuid='".$userid."',
			   _update='".$time."'
			   ";
			   if($infoboard->tbupdate("_infoboardq", $fieldupdate, "_page", $page)){
					$infoboard->savecache($cat, $page);
					$infoboard->updateproof("unproof", $cat, $page);
					refurl($iscon["lang"][105], $_SERVER['HTTP_REFERER']);
			   }
		  }
		  break;
		  case"ins";
		  if($infoboard->tbupdate("_infoboardi", "_active='1'", "_cid", $cid)){

		      $query=mysql_db_query($infoboard->dbname, "select _name, _level, _userid, _time from _infoboardi where _cid='".$cid."'");
			  if($result = @mysql_fetch_array($query)){
				   $name = $result["_name"];
				   $level = $result["_level"];
				   $userid = $result["_userid"];
				   $time = $result["_time"];
			   }

			   $fieldupdate="
			   _insert=_insert+1,
			   _save='2',
			   _ansname='".$name."',
			   _anslevel='".$level."',
			   _ansuid='".$userid."',
			   _update='".$time."'
			   ";

			   if($infoboard->tbupdate("_infoboardq", $fieldupdate, "_page", $page)){
					$infoboard->savecache($cat, $page);
					$infoboard->updateproof("unproof", $cat, $page);
					refurl($iscon["lang"][105], $_SERVER['HTTP_REFERER']);
			   }
		  }
		  break;

		  default;
		  }
refurl("", $_SERVER['HTTP_REFERER']);

?>
Return current item: infoboard