konu_model.php 450 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. *
  4. */
  5. class Konu_model extends Model{
  6. function yorumekle($post){
  7. $konu_id = explode('-', $post['konu_id']);
  8. DB::insert('yorum',[
  9. 'isim' => $post['isim'],
  10. 'mail' => $post['mail'],
  11. 'mesaj' => $post['mesaj'],
  12. 'konu_id' => $konu_id['0'],
  13. 'currentdate' => $post['currentdate'],
  14. ]);
  15. if (DB::affectedRows()) {
  16. jalert('Yorumunuz onaylandıktan sonra yayına girecektir..');
  17. git('konu/'.$post['konu_id']);
  18. }
  19. }
  20. }