OpenVPN_Management_GUI/Modules/Forum/close_topic.php

32 lines
753 B
PHP
Raw Normal View History

2012-07-16 21:30:19 +02:00
<?php
session_start();
include($_SERVER["DOCUMENT_ROOT"]."/Site/checkadmin.php");
$tbl_name="forum_question"; // Table name
$moduleurl = $_POST["path"];
// Connect to server and select database.
include ($_SERVER["DOCUMENT_ROOT"]."/Config/_dbconfig_.php");
@$y = mysql_connect($MYSQL_HOST,$MYSQL_USER,$MYSQL_PASS);
@$x = mysql_select_db($MYSQL_DATABASE);
if (empty($x))
{
die ("Keine Verbindung zur Datenbank! [<b><font color=red>FAIL</b></font>]<br>");
}
// get data that sent from form
$topic=$_POST['topicid'];
$sql="UPDATE $tbl_name SET closed ='1' WHERE id ='$topic'";
$result=mysql_query($sql);
if($result)
{
header ("Location: ".$moduleurl."&uebergabe=0&uebergabe2=1&uebergabe3=1");
}
else
{
echo "ERROR";
}
mysql_close();
?>