private function view_customer() { $id = $_GET['id']; if ($_POST) { $update = $this->customer->update_blocked_status_customer($id); if ($update) { redirect($this->base_link); } else { parent::alert('error', 'Gagal !', 'Gagal merubah status pelanggan !'); } } $customer = $this->customer->get_customer('', $id); $detail = $this->customer->get_customer('detail', $id); if ($customer['blocked'] == 'N') { $status = $this->radio_config('blocked', 'checked', ''); } else { $status = $this->radio_config('blocked', '', 'checked'); } $customer_data = array(array('label' => '<img src="' . $this->img_dir . 'no_image.jpg" />', 'input' => ''), array('label' => 'Tgl registrasi', 'input' => html_input('text', array('value="' . $customer['reg_date'] . '"', 'class="span3"', 'disabled'))), array('label' => 'Nama lengkap', 'input' => html_input('text', array('value="' . $detail['fullname'] . '"', 'class="span3"', 'disabled'))), array('label' => 'Status', 'input' => $status), array('label' => 'Jenis kelamin', 'input' => html_input('text', array('value="' . $detail['sex'] . '"', 'class="span3"', 'disabled'))), array('label' => 'Alamat', 'input' => html_textarea(array('class="span6"', 'disabled'), $detail['address'])), array('label' => 'Provinsi', 'input' => html_input('text', array('value="' . $detail['state'] . '"', 'class="span3"', 'disabled'))), array('label' => 'Kota', 'input' => html_input('text', array('value="' . $detail['city'] . '"', 'class="span3"', 'disabled'))), array('label' => 'Kode pos', 'input' => html_input('text', array('value="' . $detail['postal_code'] . '"', 'class="span3"', 'disabled'))), array('label' => 'No.Telp', 'input' => html_input('text', array('value="' . $detail['phone_number'] . '"', 'class="span3"', 'disabled'))), array('label' => 'Email', 'input' => html_input('text', array('value="' . $detail['email'] . '"', 'class="span3"', 'disabled')))); $button = array(html_input('submit', array('value="Simpan"', 'class="btn btn-success"')), html_input('button', array('value="Kirim Pesan"', 'onClick="window.location.go(-1)"', 'class="btn btn-success"'))); parent::form_config('', '', $customer_data, 'Data pelanggan', $button); }
private function form($form_title, $form_data) { $button = array(html_input('submit', array('value="Simpan"', 'class="btn btn-inverse"')), html_input('button', array('value="Kembali"', 'onclick="history.go(-1);"', 'class="btn btn-inverse"'))); parent::form_config('', '', $form_data, $form_title, $button); }
private function form($form_title, $form_data) { $tab_data = array(array('tab_active' => 'active', 'tab_link' => 'main-config', 'tab_title' => 'Website', 'tab_data' => $form_data[0]), array('tab_link' => 'other-config', 'tab_title' => 'Other', 'tab_data' => $form_data[1])); $button = array(html_input('submit', array('value="Simpan"', 'class="btn btn-inverse"'))); parent::form_config('yes', $tab_data, '', $form_title, $button); }
/** * Form data **/ private function form_data($form_title, $product_data, $product_conf) { $tab_data = array(array('tab_active' => 'active', 'tab_link' => 'product-data', 'tab_title' => 'Data Produk', 'tab_data' => $product_data), array('tab_link' => 'product-setting', 'tab_title' => 'Konfigurasi', 'tab_data' => $product_conf)); $button = array(html_input('submit', array('value="Simpan"', 'class="btn btn-success"'))); parent::form_config('yes', $tab_data, '', $form_title, $button); }
private function form_data($form_title, $form_data) { $button = array(html_input('submit', array('value="Simpan"', 'class="btn btn-success"'))); parent::form_config('', '', $form_data, $form_title, $button); }
private function form_data($form_title, $brand_data, $brand_config) { $tab_data = array(array('tab_active' => 'active', 'tab_link' => 'brand-data', 'tab_title' => 'Data Brand', 'tab_data' => $brand_data), array('tab_link' => 'brand-config', 'tab_title' => 'Konfigurasi', 'tab_data' => $brand_config)); $button = array(html_input('submit', array('value="Simpan"', 'class="btn btn-success"'))); parent::form_config('yes', $tab_data, '', $form_title, $button); }