public function albumPhotoCommentAction() { $this->_helper->layout()->disableLayout(); $objModelComment = new Application_Model_Comment(); $objModelUser = new Application_Model_User(); $arrPostVal = $this->getRequest()->getParams(); $usersNs = new Zend_Session_Namespace("members"); $userFullName = $usersNs->userFullName; $item_id = $arrPostVal['item_id']; $comment = $arrPostVal['comment']; $item_type = $arrPostVal['item_type']; $userId = $usersNs->userId; $option['comment'] = addslashes(strip_tags($comment)); $option['parentId'] = 0; $option['itemType'] = $item_type; $option['itemId'] = $item_id; $option['addedon'] = time(); $option['updatedon'] = time(); $option['userId'] = $userId; $option['publish'] = 1; $objModelComment->setOptions($option); $commentId = $objModelComment->save(); /*-------------------------------------------------*/ $valUser = $objModelUser->find($userId); $this->view->userImage = $valUser->getImage(); $this->view->userFullName = $userFullName; $this->view->comment = nl2br(strip_tags($comment)); $this->view->commentId = $commentId; }