/** * * */ public function hollyentryAction() { if ($this->getRequest()->isPost()) { $userid = $this->user->getId(); $folderObj = new Application_Model_Folder($this->user); $h_cid = (int) trim($this->request->getParam("h_cid")) ?: 0; $h_msg = trim($this->request->getParam("h_msg")); $h_sendtime = trim($this->request->getParam("h_sendtime")); $h_msgid = (int) trim($this->request->getParam('h_msgid')); $h_folder = trim($this->request->getParam('h_folder')); if ($h_cid != 0 && $folderObj->canselinghollyCampaign($h_cid)) { echo 'Campaign has been canceled'; exit; } if ($h_msgid == 0 && $folderObj->sethollyCampaign($h_msg, $h_sendtime, $h_folder, $userid) == 1) { echo 'Data has been saved'; } elseif ($h_msgid != 0 && $folderObj->updatehollyCampaign($h_msg, $h_sendtime, $h_folder, $h_msgid, $userid) == 1) { echo 'Changes has been saved'; } else { echo 'No data action'; } // echo $h_msg."\n".$h_sendtime."\n".$h_folder."\n".$h_msgid; } exit; }