public function find_slider() { $this->use->use_model('data_base'); $this->use->use_lib('table/tpl_slider'); $tpl = new tpl_slider(); $db = new data_base($tpl->table(), array($tpl->id(), $tpl->text(), $tpl->image()), array($tpl->status() => 1)); return $db->get_where(); }
public function update_status_slider() { $this->use->use_model('data_base'); $this->use->use_lib('table/tpl_slider'); $tpl = new tpl_slider(); $db = new data_base($tpl->table(), array($tpl->status() => $_POST['status']), array($tpl->id() => $_POST['id'])); echo json_encode(array('valid' => $db->change(), 'massage' => '<div class="alert alert-success alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true"></button><h4>Alert!</h4> <strong>Update success </strong></div>')); }
" data-cache="false" data-height="400" data-show-refresh="true" data-show-toggle="true" data-show-columns="true" data-pagination="true" data-page-list="[5, 10, 20, 50, 100, 200]" data-search="true" data-flat="true" data-toolbar="#toolbar"> <thead> <tr> <th data-field="<?php echo $tpl_slider->id(); ?> " data-halign="center" data-sortable="true"> ID</th> <th data-field="<?php echo $tpl_slider->text(); ?> " data-halign="center" data-sortable="true"> Text</th> <th data-field="<?php echo $tpl_slider->status(); ?> " data-width="10" data-halign="center" data-sortable="true" data-formatter="operate<?php echo $tpl_slider->status(); ?> "> Status </th> <th data-field="<?php echo $tpl_slider->image(); ?> " data-formatter="operate<?php echo $tpl_slider->image(); ?> "