function down_position_image($id, $bannercat_id, $step = 1) { $o = new banner(); $o->get_by_id($id); if (!$o->exists()) { show_404("Không tìm thấy"); } for ($i = 0; $i < $step; $i++) { $o->down_position(); } // flash_message('warning','Không th? thay d?i v? trí du?c n?a '); redirect($this->admin . 'bannercats/list_image/' . $bannercat_id); }
function delete_image($id) { $banner = new banner($id); if (!$banner->exists()) { show_404(); } $bannercat_id = $banner->bannercat_id; $banner->delete(); redirect($this->admin_url . "bannercats/list_image/" . $bannercat_id); }