-
Notifications
You must be signed in to change notification settings - Fork 2
/
insert.php
36 lines (28 loc) · 1.19 KB
/
insert.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?
/************************************************************************/
/* AgorActu 0.1 - RSS agregator with anonymous comments */
/* Copyright (c)2012 Swiss Pirate Party www.partipirate.ch */
/* ---------------------------------------------------------------------*/
/* This is insert.php - Read the readme.txt file for more info */
/************************************************************************/
error_reporting(E_ALL);
include ("db.connect.php");
$intcontent=$_POST["expcontent"];
$intuser=$_POST["expuser"];
$intitemid=$_POST["expitemid"];
$intsource=$_POST["expsource"];
$intcurrent=$_POST["expcurrent"];
$intlisttype=$_POST["explisttype"];
if (strlen($intcontent) ==0){
/*alert*/
}else{
$up_query="INSERT INTO comments ( content, who, what_item_id, com_ip ) VALUES ( '".htmlspecialchars($intcontent)."', '".htmlspecialchars($intuser)."' , '$intitemid','".$_SERVER['REMOTE_ADDR']."')";
mysql_query($up_query) or die('Error, query failed');
/* echo $up_query;
echo "<br><a href=\"list.php\">Short List</a>"; */
} echo "<script>
<!--
location.replace(\"".$intsource.".php?currentpage=".$intcurrent."&listtype=".$intlisttype."&postid=".$intitemid."#".$intitemid."\");
-->
</script>";
?>