VPN-Management-GUI 2.0.3 porting start
96
Modules/Forum/add_answer.php
Executable file
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
$tempname = $_FILES['datei']['tmp_name'];
|
||||
$name = $_FILES['datei']['name'];
|
||||
$type = $_FILES['datei']['type'];
|
||||
$size = $_FILES['datei']['size'];
|
||||
session_start();
|
||||
|
||||
$tbl_name="forum_answer"; // 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 value of id that sent from hidden field
|
||||
$id=mysql_real_escape_string($_POST['id']);
|
||||
|
||||
// Find highest answer number.
|
||||
$sql="SELECT MAX(a_id) AS Maxa_id FROM ". $tbl_name ." WHERE question_id='".$id."'";
|
||||
$result=mysql_query($sql);
|
||||
$rows=mysql_fetch_array($result);
|
||||
// add + 1 to highest answer number and keep it in variable name "$Max_id". if there no answer yet set it = 1
|
||||
if ($rows)
|
||||
{
|
||||
$Max_id = $rows['Maxa_id']+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$Max_id = 1;
|
||||
}
|
||||
|
||||
//----------------- Uploads
|
||||
if($type == "php" || $type == "application/x-httpd-php" || $type == "htm" || $type == "html" || $type == "text/html")
|
||||
die("NO HTML OR PHP FILES ALLOWED!");
|
||||
if($tempname != "" && $name != "")
|
||||
{
|
||||
move_uploaded_file($tempname, $_SERVER["DOCUMENT_ROOT"]."/Modules/Forum/uploads/".$id."-".$Max_id."-".$name);
|
||||
}
|
||||
//die("tmP:".$tempname." name:".$name);
|
||||
|
||||
//-----------------
|
||||
|
||||
|
||||
// get values that sent from form
|
||||
$a_name=mysql_real_escape_string($_SESSION["user_nickname"]);
|
||||
if($a_name == "" || !$_SESSION['user_nickname'])
|
||||
{
|
||||
$a_name = "guest";
|
||||
}
|
||||
$a_avatar=mysql_real_escape_string($_SESSION["user_avatar"]);
|
||||
$a_answer=mysql_real_escape_string($_POST['a_answer']);
|
||||
|
||||
$datetime=date("d-m-y H:i:s"); // create date and time
|
||||
|
||||
if($tempname != "" && $tempname != "")
|
||||
{
|
||||
$dbeintrag= $id.'-'.$Max_id.'-'.$name;
|
||||
}
|
||||
else
|
||||
{
|
||||
$dbeintrag = "";
|
||||
}
|
||||
if($a_answer != "")
|
||||
{
|
||||
// Insert answer
|
||||
$sql2="INSERT INTO $tbl_name(question_id, a_id, a_name, a_avatar, a_answer, a_datetime, a_attachment)VALUES('$id', '$Max_id', '$a_name', '$a_avatar', '$a_answer', '$datetime', '$dbeintrag')";
|
||||
$result2=mysql_query($sql2);
|
||||
|
||||
if($result2)
|
||||
{
|
||||
// If added new answer, add value +1 in reply column
|
||||
$tbl_name2="forum_question";
|
||||
$sql3="UPDATE $tbl_name2 SET reply='$Max_id' WHERE id='$id'";
|
||||
$result3=mysql_query($sql3);
|
||||
$datetime=date('Y-m-d H:i:s');
|
||||
$sql3="UPDATE $tbl_name2 SET `lastupdate` = NOW( ) WHERE `forum_question`.`id`='$id'";
|
||||
$result3=mysql_query($sql3);
|
||||
header ("Location: ".$moduleurl."&uebergabe=1&uebergabe2=".$id);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "ERROR";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
header ("Location: ".$moduleurl."&uebergabe=1&uebergabe2=".$id);
|
||||
}
|
||||
mysql_close();
|
||||
?>
|
52
Modules/Forum/add_topic.php
Executable file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
include($_SERVER["DOCUMENT_ROOT"]."/Site/checkuser.php");
|
||||
$tbl_name="forum_question"; // Table name
|
||||
$uebergabe = 1;
|
||||
// Connect to server and select database.
|
||||
include ($_SERVER["DOCUMENT_ROOT"]."/Config/_dbconfig_.php");
|
||||
|
||||
$moduleurl = $_POST['path'];
|
||||
@$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=mysql_real_escape_string($_POST['topic']);
|
||||
$writeperm=mysql_real_escape_string($_POST['writeperm']);
|
||||
$readperm=mysql_real_escape_string($_POST['readperm']);
|
||||
$detail=mysql_real_escape_string($_POST['detail']);
|
||||
$name=mysql_real_escape_string($_SESSION['user_nickname']);
|
||||
$avatar=mysql_real_escape_string($_SESSION['user_avatar']);
|
||||
|
||||
$datetime=date("d-m-y H:i:s"); //create date time
|
||||
if($topic != "" && $detail != "")
|
||||
{
|
||||
$sql="INSERT INTO $tbl_name(topic, detail, name, avatar, w_adminonly, w_guest, r_adminonly, r_guest, datetime)VALUES('$topic', '$detail', '$name', '$avatar', ";
|
||||
if($writeperm=="admin"){$sql=$sql."1, ";}else{$sql=$sql."0, ";}
|
||||
if($writeperm=="any"){$sql=$sql."1, ";}else{$sql=$sql."0, ";}
|
||||
if($readperm=="admin"){$sql=$sql."1, ";}else{$sql=$sql."0, ";}
|
||||
if($readperm=="any"){$sql=$sql."1, ";}else{$sql=$sql."0, ";}
|
||||
$sql=$sql."'$datetime')";
|
||||
//echo $sql;
|
||||
$result=mysql_query($sql);
|
||||
|
||||
if($result)
|
||||
{
|
||||
header ("Location: ".$moduleurl."&uebergabe=0");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "ERROR";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
header ("Location: ".$moduleurl."&uebergabe=0");
|
||||
}
|
||||
mysql_close();
|
||||
?>
|
BIN
Modules/Forum/avatar/0.png
Executable file
After Width: | Height: | Size: 64 KiB |
BIN
Modules/Forum/avatar/1.png
Executable file
After Width: | Height: | Size: 10 KiB |
BIN
Modules/Forum/avatar/10.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
Modules/Forum/avatar/100.png
Executable file
After Width: | Height: | Size: 11 KiB |
BIN
Modules/Forum/avatar/101.png
Executable file
After Width: | Height: | Size: 13 KiB |
BIN
Modules/Forum/avatar/102.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
Modules/Forum/avatar/11.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
Modules/Forum/avatar/12.png
Executable file
After Width: | Height: | Size: 11 KiB |
BIN
Modules/Forum/avatar/13.png
Executable file
After Width: | Height: | Size: 16 KiB |
BIN
Modules/Forum/avatar/14.png
Executable file
After Width: | Height: | Size: 13 KiB |
BIN
Modules/Forum/avatar/15.png
Executable file
After Width: | Height: | Size: 8.2 KiB |
BIN
Modules/Forum/avatar/16.png
Executable file
After Width: | Height: | Size: 10 KiB |
BIN
Modules/Forum/avatar/17.png
Executable file
After Width: | Height: | Size: 13 KiB |
BIN
Modules/Forum/avatar/18.png
Executable file
After Width: | Height: | Size: 16 KiB |
BIN
Modules/Forum/avatar/19.png
Executable file
After Width: | Height: | Size: 15 KiB |
BIN
Modules/Forum/avatar/2.png
Executable file
After Width: | Height: | Size: 49 KiB |
BIN
Modules/Forum/avatar/20.png
Executable file
After Width: | Height: | Size: 17 KiB |
BIN
Modules/Forum/avatar/21.png
Executable file
After Width: | Height: | Size: 11 KiB |
BIN
Modules/Forum/avatar/22.png
Executable file
After Width: | Height: | Size: 18 KiB |
BIN
Modules/Forum/avatar/23.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
Modules/Forum/avatar/24.png
Executable file
After Width: | Height: | Size: 15 KiB |
BIN
Modules/Forum/avatar/25.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
Modules/Forum/avatar/26.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
Modules/Forum/avatar/27.png
Executable file
After Width: | Height: | Size: 9.3 KiB |
BIN
Modules/Forum/avatar/28.png
Executable file
After Width: | Height: | Size: 90 KiB |
BIN
Modules/Forum/avatar/29.png
Executable file
After Width: | Height: | Size: 17 KiB |
BIN
Modules/Forum/avatar/3.png
Executable file
After Width: | Height: | Size: 49 KiB |
BIN
Modules/Forum/avatar/30.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
Modules/Forum/avatar/31.png
Executable file
After Width: | Height: | Size: 11 KiB |
BIN
Modules/Forum/avatar/32.png
Executable file
After Width: | Height: | Size: 17 KiB |
BIN
Modules/Forum/avatar/33.png
Executable file
After Width: | Height: | Size: 17 KiB |
BIN
Modules/Forum/avatar/34.png
Executable file
After Width: | Height: | Size: 18 KiB |
BIN
Modules/Forum/avatar/35.png
Executable file
After Width: | Height: | Size: 15 KiB |
BIN
Modules/Forum/avatar/36.png
Executable file
After Width: | Height: | Size: 11 KiB |
BIN
Modules/Forum/avatar/37.png
Executable file
After Width: | Height: | Size: 15 KiB |
BIN
Modules/Forum/avatar/38.png
Executable file
After Width: | Height: | Size: 11 KiB |
BIN
Modules/Forum/avatar/39.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
Modules/Forum/avatar/4.png
Executable file
After Width: | Height: | Size: 16 KiB |
BIN
Modules/Forum/avatar/40.png
Executable file
After Width: | Height: | Size: 9.7 KiB |
BIN
Modules/Forum/avatar/41.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
Modules/Forum/avatar/42.png
Executable file
After Width: | Height: | Size: 13 KiB |
BIN
Modules/Forum/avatar/43.png
Executable file
After Width: | Height: | Size: 17 KiB |
BIN
Modules/Forum/avatar/44.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
Modules/Forum/avatar/45.png
Executable file
After Width: | Height: | Size: 19 KiB |
BIN
Modules/Forum/avatar/46.png
Executable file
After Width: | Height: | Size: 11 KiB |
BIN
Modules/Forum/avatar/47.png
Executable file
After Width: | Height: | Size: 11 KiB |
BIN
Modules/Forum/avatar/48.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
Modules/Forum/avatar/49.png
Executable file
After Width: | Height: | Size: 18 KiB |
BIN
Modules/Forum/avatar/5.png
Executable file
After Width: | Height: | Size: 16 KiB |
BIN
Modules/Forum/avatar/50.png
Executable file
After Width: | Height: | Size: 16 KiB |
BIN
Modules/Forum/avatar/51.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
Modules/Forum/avatar/52.png
Executable file
After Width: | Height: | Size: 81 KiB |
BIN
Modules/Forum/avatar/53.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
Modules/Forum/avatar/54.png
Executable file
After Width: | Height: | Size: 15 KiB |
BIN
Modules/Forum/avatar/55.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
Modules/Forum/avatar/56.png
Executable file
After Width: | Height: | Size: 16 KiB |
BIN
Modules/Forum/avatar/57.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
Modules/Forum/avatar/58.png
Executable file
After Width: | Height: | Size: 10 KiB |
BIN
Modules/Forum/avatar/59.png
Executable file
After Width: | Height: | Size: 16 KiB |
BIN
Modules/Forum/avatar/6.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
Modules/Forum/avatar/60.png
Executable file
After Width: | Height: | Size: 15 KiB |
BIN
Modules/Forum/avatar/61.png
Executable file
After Width: | Height: | Size: 13 KiB |
BIN
Modules/Forum/avatar/62.png
Executable file
After Width: | Height: | Size: 8.5 KiB |
BIN
Modules/Forum/avatar/63.png
Executable file
After Width: | Height: | Size: 10 KiB |
BIN
Modules/Forum/avatar/64.png
Executable file
After Width: | Height: | Size: 13 KiB |
BIN
Modules/Forum/avatar/65.png
Executable file
After Width: | Height: | Size: 13 KiB |
BIN
Modules/Forum/avatar/66.png
Executable file
After Width: | Height: | Size: 8.6 KiB |
BIN
Modules/Forum/avatar/67.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
Modules/Forum/avatar/68.png
Executable file
After Width: | Height: | Size: 8.0 KiB |
BIN
Modules/Forum/avatar/69.png
Executable file
After Width: | Height: | Size: 10 KiB |
BIN
Modules/Forum/avatar/7.png
Executable file
After Width: | Height: | Size: 13 KiB |
BIN
Modules/Forum/avatar/70.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
Modules/Forum/avatar/71.png
Executable file
After Width: | Height: | Size: 11 KiB |
BIN
Modules/Forum/avatar/72.png
Executable file
After Width: | Height: | Size: 15 KiB |
BIN
Modules/Forum/avatar/73.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
Modules/Forum/avatar/74.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
Modules/Forum/avatar/75.png
Executable file
After Width: | Height: | Size: 8.9 KiB |
BIN
Modules/Forum/avatar/76.png
Executable file
After Width: | Height: | Size: 13 KiB |
BIN
Modules/Forum/avatar/77.png
Executable file
After Width: | Height: | Size: 15 KiB |
BIN
Modules/Forum/avatar/78.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
Modules/Forum/avatar/79.png
Executable file
After Width: | Height: | Size: 10 KiB |
BIN
Modules/Forum/avatar/8.png
Executable file
After Width: | Height: | Size: 8.8 KiB |
BIN
Modules/Forum/avatar/80.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
Modules/Forum/avatar/81.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
Modules/Forum/avatar/82.png
Executable file
After Width: | Height: | Size: 8.9 KiB |
BIN
Modules/Forum/avatar/83.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
Modules/Forum/avatar/84.png
Executable file
After Width: | Height: | Size: 11 KiB |
BIN
Modules/Forum/avatar/85.png
Executable file
After Width: | Height: | Size: 5.7 KiB |
BIN
Modules/Forum/avatar/86.png
Executable file
After Width: | Height: | Size: 8.3 KiB |
BIN
Modules/Forum/avatar/87.png
Executable file
After Width: | Height: | Size: 11 KiB |
BIN
Modules/Forum/avatar/88.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
Modules/Forum/avatar/89.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
Modules/Forum/avatar/9.png
Executable file
After Width: | Height: | Size: 9.9 KiB |
BIN
Modules/Forum/avatar/90.png
Executable file
After Width: | Height: | Size: 15 KiB |
BIN
Modules/Forum/avatar/91.png
Executable file
After Width: | Height: | Size: 13 KiB |
BIN
Modules/Forum/avatar/92.png
Executable file
After Width: | Height: | Size: 9.1 KiB |
BIN
Modules/Forum/avatar/93.png
Executable file
After Width: | Height: | Size: 11 KiB |
BIN
Modules/Forum/avatar/94.png
Executable file
After Width: | Height: | Size: 10 KiB |