2 /************************************************************************/
\r
4 /************************************************************************/
\r
5 /* Copyright (c) 2010 */
\r
6 /* Inclusive Design Institute */
\r
8 /* This program is free software. You can redistribute it and/or */
\r
9 /* modify it under the terms of the GNU General Public License */
\r
10 /* as published by the Free Software Foundation. */
\r
11 /************************************************************************/
\r
13 define('TR_INCLUDE_PATH', '../../include/');
\r
14 require(TR_INCLUDE_PATH.'vitals.inc.php');
\r
15 require_once(TR_INCLUDE_PATH.'classes/DAO/ContentDAO.class.php');
\r
19 if (trim($_POST['field']) <> "" && trim($_POST['value']) <> "")
\r
21 $fields = explode('-', $_POST['field']);
\r
22 $content_id = intval($fields[1]);
\r
24 if ($content_id > 0)
\r
26 $contentDAO = new ContentDAO();
\r
28 if ($contentDAO->UpdateField($content_id, 'title', $_POST['value']))
\r
30 $rtn['status'] = 'success';
\r
31 $rtn['success'][] = _AT('TR_FEEDBACK_ACTION_COMPLETED_SUCCESSFULLY');
\r
35 $rtn['status'] = 'fail';
\r
36 $rtn['success'][] = _AT('TR_ERROR_UNABLE_UPDATE_DB');
\r
38 echo json_encode($rtn);
\r