Example #1
0
 protected function delete()
 {
     $this->_mStatus = $this->_oFriendModel->delete($this->session->get('member_id'), $this->httpRequest->post('friendId'));
     if (!$this->_mStatus) {
         $this->_sMsg = jsonMsg(0, t('Cannot remove friend, please try later.'));
     } else {
         $this->_sMsg = jsonMsg(1, t('The friends we been deleted.'));
     }
     echo $this->_sMsg;
 }
Example #2
0
 protected function delete()
 {
     $sTable = AdsCore::getTable();
     $this->_bStatus = $this->_oAdsModel->delete($this->_oHttpRequest->post('adsId'), $sTable);
     if ($this->_bStatus) {
         /* Clean AdminCoreModel Ads and Model\Design for STATIC data */
         (new Framework\Cache\Cache())->start(Design::CACHE_STATIC_GROUP, null, null)->clear()->start(AdsCoreModel::CACHE_GROUP, 'totalAds', null)->clear()->start(AdsCoreModel::CACHE_GROUP, 'totalAdsAffiliates', null)->clear();
         $this->_sMsg = jsonMsg(1, t('The Advertisement we been deleted.'));
     } else {
         $this->_sMsg = jsonMsg(0, t('Cannot remove Advertisement, please try later.'));
     }
     echo $this->_sMsg;
 }
 protected function delete()
 {
     if (AdminCore::auth() && !UserCore::auth()) {
         $this->_bStatus = $this->_oMailModel->adminDeleteMsg($this->_oHttpRequest->post('msg_id'));
     } else {
         $this->_bStatus = $this->_oMailModel->setTo($this->_oSession->get('member_id'), $this->_oHttpRequest->post('msg_id'), 'delete');
     }
     if (!$this->_bStatus) {
         $this->_sMsg = jsonMsg(0, t('Your message does not exist anymore.'));
     } else {
         $this->_sMsg = jsonMsg(1, t('Your message has been successfully removed!'));
     }
     echo $this->_sMsg;
 }
 protected function delete()
 {
     if ($this->_oSession->get('member_id') == $this->_oHttpRequest->post('recipient_id') || $this->_oSession->get('member_id') == $this->_oHttpRequest->post('sender_id') || AdminCore::auth()) {
         $this->_bStatus = $this->_oCommentModel->delete($this->_oHttpRequest->post('id'), $this->_oHttpRequest->post('recipient_id'), $this->_oHttpRequest->post('sender_id'), $this->_oHttpRequest->post('table'));
         if ($this->_bStatus) {
             /* Clean All Data of CommentModel Cache */
             (new Framework\Cache\Cache())->start(CommentCoreModel::CACHE_GROUP, null, null)->clear();
             $this->_sMsg = jsonMsg(1, t('Your comment has been successfully removed!'));
         } else {
             $this->_sMsg = jsonMsg(0, t('Your comment could not be deleted because there no exist.'));
         }
     } else {
         $this->_sMsg = jsonMsg(0, t('Whoops! The comment could not be removed!'));
     }
     echo $this->_sMsg;
 }
 protected function clearCache()
 {
     switch ($this->httpRequest->post('type')) {
         case 'general':
             $this->file->deleteDir(PH7_PATH_CACHE . Framework\Cache\Cache::CACHE_DIR);
             break;
         case 'tpl_compile':
             $this->file->deleteDir(PH7_PATH_CACHE . Framework\Layout\Tpl\Engine\PH7Tpl\PH7Tpl::COMPILE_DIR);
             break;
         case 'tpl_html':
             $this->file->deleteDir(PH7_PATH_CACHE . Framework\Layout\Tpl\Engine\PH7Tpl\PH7Tpl::CACHE_DIR);
             break;
         case 'static':
             $this->file->deleteDir(PH7_PATH_CACHE . Framework\Layout\Gzip\Gzip::CACHE_DIR);
             break;
         default:
             Framework\Http\Http::setHeadersByCode(400);
             exit('Bad Request Error');
     }
     echo jsonMsg(1, t('The cache has been deleted!'));
 }
Example #6
0
 protected function delete()
 {
     $this->_bStatus = $this->_oWallModel->delete($this->session->get('member_id'), $this->httpRequest->post('post'));
     if (!$this->_bStatus) {
         $this->_sMsg = jsonMsg(0, t('Your post could not be deleted because there no exist.'));
     } else {
         $this->_sMsg = jsonMsg(1, t('Your post has been sent successfully!'));
     }
     echo $this->_sMsg;
 }
Example #7
0
 /**
  * Displays the votes.
  *
  * @access public
  * @return string
  */
 public function show()
 {
     return jsonMsg($this->_iStatus, $this->_sTxt);
 }
 protected function delete()
 {
     $this->_bStatus = $this->_oReportModel->delete($this->_oHttpRequest->post('reportId'));
     echo $this->_bStatus ? jsonMsg(1, t('The Report we been deleted.')) : jsonMsg(0, t('Cannot remove Report, please try later.'));
 }