public function delete()
 {
     $Blog = new Blog($this->plural_resorce, $this->option, $this->db);
     $sql = $Blog->delete();
     var_dump($sql);
     mysqli_query($this->db, $sql) or die(mysqli_error($this->db));
     header('Location:../index');
     exit;
 }
Example #2
0
}

$f_action = Input::Get('f_action', 'string');

if (!camp_blog_permission_check($f_action)) {
    echo getGS('You do not have the right to perform this action.');
    exit;
}

switch ($f_action) {
    case 'blogs_delete':
        $f_blogs = Input::Get('f_blogs', 'array');

        foreach ($f_blogs as $blog_id) {
            $Blog = new Blog($blog_id);
            $Blog->delete();
        }
    break;

    case 'entries_delete':
        $f_entries = Input::Get('f_entries', 'array');

        foreach ($f_entries as $entry_id) {
            $BlogEntry = new BlogEntry($entry_id);
            $BlogEntry->delete();
        }
    break;


    case 'comments_delete':
        $f_comments = Input::Get('f_comments', 'array');
Example #3
0
 public function delete($id)
 {
     //モデルを呼び出す
     $blog = new Blog();
     $this->deleteOptions = $blog->delete($id);
     header('Location: /seed_blog/blogs/index');
 }
Example #4
0
 public function delete($id)
 {
     $blog = new Blog();
     $blog->delete($id);
     // indexへ遷移
     header('Location: /seed_blog/blogs/index/');
 }
Example #5
0
 public function delete($id)
 {
     $blog = new Blog();
     $this->viewOptions = $blog->delete($id);
     // var_dump($this->viewOptions);
     // アクション名を設定する
     // $this->action ='edit';
     // indexへ遷移
     header('Location: /seed_blog/blogs/index/');
 }
Example #6
0
 /**
  * @expectedException SimpleAR\Exception
  */
 public function testDeleteInstanceOnNewModel()
 {
     // Cannot delete a new model instance.
     $blog = new Blog();
     $blog->delete();
 }