?> </td> <td><?php echo $promo->start_date; ?> </td> <td><?php echo $promo->end_date; ?> </td> <td><?php echo $promo->discount; ?> </td> <td><?php echo _toaktif('admin/promo/aktif/', $promo->idpromo, $promo->status); ?> </td> <td> <a href="<?php echo base_url('index.php/admin/promo/edit/' . $promo->idclass); ?> " class="btn btn-default btn-xs btn-primary" data-target="#telo" role="button" data-toggle="modal"><span class="glyphicon glyphicon-edit"></span> Edit</a> </td> </tr> <?php } else { ?> <tr><td>Belum ada data !</td></tr> <?php }
public function get_img() { $tinythumb = base_url('assets/img'); $id_places = $this->input->post('id_places'); $data = $this->m_places->get_img(array('id_places' => $id_places)); $str = ''; if ($data->result()) { foreach ($data->result() as $row) { $str .= '<div class="col-md-3 thumb" style="margin-bottom:5px">'; $str .= '<img class="responsive" src="' . $tinythumb . '/timthumb.php?src=' . base_url() . $row->image . '&h=150&w=150&zc=1">'; $str .= '<a href="' . site_url('places/del_img') . '" class="btn btn-primary" id="delete_img' . $row->id_photo . '">Delete</a>'; $str .= _toaktif('admin/places/set_default' . '/' . $id_places, $row->id_photo, $row->default); $str .= '</div>'; $str .= '<script>del_img(' . $row->id_photo . ');</script>'; $str .= '<script>to_active("admin/places/set_default/' . $id_places . '",' . $row->id_photo . ',' . $row->default . ');</script>'; } } else { $str .= '<div class="col-md-3 thumb" style="margin-bottom:5px"><p>No Photos Yet</p></div>'; } echo $str; }
<?php foreach ($gambar as $g) { ?> <div class="col-lg-3 col-md-4 col-xs-6 thumb"> <a class="thumbnail fancybox-thumb" rel="fancybox-thumb" href="<?php echo base_url() . $g->image; ?> "><img class="img-responsive" src="<?php echo base_url() . $g->thumb; ?> "></a> <?php echo btn_delete('admin/kelas/hapus_foto/' . $g->idclass . '/' . $g->id_foto_produk); ?> <?php echo _toaktif('admin/kelas/set_default/' . $g->idclass . '/', $g->id_foto_produk, $g->default); ?> </div> <?php } } else { ?> <div class="col-lg-12"> Belum ada Gambar </div> <?php } ?> <div class="col-lg-12"> <h3 class="page-header">Tambah Gambar</h3>