VPN-Management-GUI 2.0.3 porting start
This commit is contained in:
36
Modules/Forum/delete_topic.php
Executable file
36
Modules/Forum/delete_topic.php
Executable file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
session_start();
|
||||
include($_SERVER["DOCUMENT_ROOT"]."/Site/checkuser.php");
|
||||
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="DELETE FROM ". $tbl_name ." WHERE id='".$topic."'";
|
||||
$result=mysql_query($sql);
|
||||
|
||||
$tbl_name="forum_answer";
|
||||
$sql="DELETE FROM ". $tbl_name ." WHERE question_id='".$topic."'";
|
||||
$result1=mysql_query($sql);
|
||||
|
||||
if($result && $result1)
|
||||
{
|
||||
header ("Location: ".$moduleurl."&uebergabe=0&uebergabe2=2&uebergabe3=1");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "ERROR";
|
||||
}
|
||||
mysql_close();
|
||||
?>
|
Reference in New Issue
Block a user