<?php
session_start();
chdir('..');
	require_once('api/Simpla.php');
	$simpla = new Simpla();
if(empty($_SESSION['admin'])) exit('3');

$simpla->db->connect();

foreach($_POST as $k=>$v) $_POST[$k] = mysql_real_escape_string( $v);

$simpla->db->query("INSERT INTO `__feedback` SET `name`='".$_POST['name']."',`email`='',`text`='".$_POST['text']."',date=NOW(), `parent_id`='".(int)$_POST['parent_id']."' ");

//echo mysql_insert_id();