PageRenderTime 39ms CodeModel.GetById 13ms RepoModel.GetById 1ms app.codeStats 0ms

/masportales/application/controllers/micuenta/comentarios.php

https://github.com/eloypineda/XHTMLized
PHP | 35 lines | 26 code | 7 blank | 2 comment | 2 complexity | 1a9f821ec09b9bcc46e01b4f50dc7da3 MD5 | raw file
  1. <?php
  2. class Comentarios extends Account_Controller
  3. {
  4. public function _index_index()
  5. {
  6. $this->load->model('users_model');
  7. echo '<pre>';
  8. print_r($this->input->post());
  9. echo '</pre>';
  10. if ($this->input->post('ctpe') and $this->input->post('cmid')) {
  11. $comment_ID = $this->input->post('cmid', true);
  12. switch ($this->input->post('ctpe', true)) {
  13. case 'blog':
  14. $this->load->model('blog_model');
  15. $this->blog_model->deleteBlogComment($comment_ID);
  16. break;
  17. case 'product':
  18. $this->load->model('ecommerce_model');
  19. $this->ecommerce_model->deleteProductComment($comment_ID);
  20. echo '<p>product</p>';
  21. break;
  22. }
  23. }
  24. return $this->users_model->getUserComments($this->registry->user('user_ID'));
  25. }
  26. }
  27. /* End of file comentarios.php */
  28. /* Location: ./application/controllers/micuenta/comentarios.php */