<?php
	require_once("../system.engine/system.core.php");
	
	$mPong = array();
	$a = &$mPong;
	$p = &$_POST;
	
	global $systemHandler;
	$systemExecution = $systemHandler->loadHandler("EXECUTION");
	$systemHash = $systemHandler->loadHandler("HASH");
	/* ### DO YOUR CODES ONLY FROM HERE ### */

	$mContainerId = $p["containerId"];
	$mUserId = $systemHandler->loadHandler("USER")->mUserId;
	$mRow = $systemExecution->runQuery("SELECT * FROM web_timeline WHERE id = '%s'", $mContainerId)->fetch_assoc();
	$mSenderId = $mRow["post_user_id"];
	
	$systemExecution->runQuery("INSERT INTO web_timeline (post_user_id, post_text, post_location, post_privacy, post_hashtags_list, post_mentions_list, post_submit_date, post_image_id, post_entry_location, post_share_id) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')", array($mUserId, $mRow["post_text"], $mRow["post_location"], $mRow["post_privacy"], $mRow["post_hashtags_list"], $mRow["post_mentions_list"], time(), -1, $mUserId, $mSenderId));
	
	/* ### DO NOT CHANGE ANYTHING FROM HERE ### */
	header("Content-Type: application/json");
	echo json_encode($mPong);
?>