?> </section> <?php $total = count($this->db->get(TBL_PETLOCK)->result()); if (isset($_GET['per_page'])) { $offset = intval($_GET['per_page']); } else { $offset = 0; } $rec_per_page = $GLOBALS['global']['PAGINATE_ADMIN']['rec_per_page']; $record = $this->db->order_by('id_petlock', 'desc')->limit($rec_per_page, $offset)->get(TBL_PETLOCK)->result(); $pagination = create_pagination($uri = 'admin/juzon/config/pet_lock/?', $total_rows = $total, $limit = $rec_per_page, $uri_segment = 0, TRUE, TRUE); $path = site_url() . "image/thumb/"; $statusArr = adminStatusItemOptionData_ioc(); ?> <section class="item"> <table border="0" class="table-list clear-both"> <thead> <tr> <th>Name</th> <th>Image</th> <th>Price(J$)</th> <th>Charge per day(J$)</th> <th>Status</th> <th class="actions">Edit</th> <th class="actions">Delete</th>
function toggleStatusLock() { $id_petlock = $this->input->post('id_petlock'); $lockdata = $this->mod_io_m->init('id_petlock', $id_petlock, TBL_PETLOCK); if ($lockdata->status == 1) { $stt = 0; $this->db->where('id_petlock', $id_petlock)->update(TBL_PETLOCK, array('status' => 0)); } else { $stt = 1; $this->db->where('id_petlock', $id_petlock)->update(TBL_PETLOCK, array('status' => 1)); } $statusArr = adminStatusItemOptionData_ioc(); echo $statusArr[$stt]; exit; }
<label> Description</label> <div class="input"> <input type="text" name="description" value="<?php if ($giftdata) { echo $giftdata->description; } ?> " /> </div> <div class="clear"></div> <label> Status</label> <div class="input"> <?php echo form_dropdown('status', adminStatusItemOptionData_ioc(), array($status)); ?> </div> <div class="clear"></div> <label> Image</label> <div class="input"> <?php echo form_upload("image"); ?> <?php if ($giftdata) { ?> <img src="<?php echo $path . $giftdata->image;
<label> Category</label> <div class="input"> <input type="text" name="category_name" value="<?php if ($categorydata) { echo $categorydata->category_name; } ?> " /> </div> <div class="clear"></div> <label> Status</label> <div class="input"> <?php echo form_dropdown('status', adminStatusItemOptionData_ioc(), array($categorydata->status)); ?> </div> <div class="clear"></div> <label> </label> <div class="input"> <input type="submit" value="Submit" /> <input type="button" value="Cancel" onclick="$('#hiddenElement').dialog('close');"/> <?php echo admin_loader_image_s("id='save_loader'"); ?> </div> </div> </div>