Skip to content
Permalink
Browse files

Merge pull request #1 from Risyandi/development

adding fixing apps
  • Loading branch information...
Risyandi committed May 8, 2019
2 parents f4dbe75 + cca2f36 commit f24d2d7080bd5a64b5897876e2e23ee0dfca6786
Showing with 164,866 additions and 61 deletions.
  1. +1 −1 application/config/config.php
  2. +4 −0 application/controllers/Dashboard.php
  3. +3 −3 application/controllers/Mobil.php
  4. +51 −10 application/controllers/Motor.php
  5. +12 −0 application/models/Motor_m.php
  6. +181 −12 application/views/dashboard.php
  7. +5 −5 application/views/mobil/mobil_data.php
  8. +2 −2 application/views/mobil/mobil_form_add.php
  9. +2 −2 application/views/mobil/mobil_form_edit.php
  10. +1 −1 application/views/motor/motor_data.php
  11. +2 −2 application/views/motor/motor_form_add.php
  12. +24 −21 application/views/motor/motor_form_edit.php
  13. +7 −2 application/views/template.php
  14. +7 −0 assets/css/bootstrap.css
  15. +171 −0 assets/dataTables/Buttons-1.5.6/css/buttons.bootstrap.css
  16. +1 −0 assets/dataTables/Buttons-1.5.6/css/buttons.bootstrap.min.css
  17. +235 −0 assets/dataTables/Buttons-1.5.6/css/buttons.bootstrap4.css
  18. +1 −0 assets/dataTables/Buttons-1.5.6/css/buttons.bootstrap4.min.css
  19. +369 −0 assets/dataTables/Buttons-1.5.6/css/buttons.dataTables.css
  20. +1 −0 assets/dataTables/Buttons-1.5.6/css/buttons.dataTables.min.css
  21. +204 −0 assets/dataTables/Buttons-1.5.6/css/buttons.foundation.css
  22. +1 −0 assets/dataTables/Buttons-1.5.6/css/buttons.foundation.min.css
  23. +231 −0 assets/dataTables/Buttons-1.5.6/css/buttons.jqueryui.css
  24. +1 −0 assets/dataTables/Buttons-1.5.6/css/buttons.jqueryui.min.css
  25. +184 −0 assets/dataTables/Buttons-1.5.6/css/buttons.semanticui.css
  26. +1 −0 assets/dataTables/Buttons-1.5.6/css/buttons.semanticui.min.css
  27. +37 −0 assets/dataTables/Buttons-1.5.6/css/common.scss
  28. +141 −0 assets/dataTables/Buttons-1.5.6/css/mixins.scss
  29. +70 −0 assets/dataTables/Buttons-1.5.6/js/buttons.bootstrap.js
  30. +6 −0 assets/dataTables/Buttons-1.5.6/js/buttons.bootstrap.min.js
  31. +68 −0 assets/dataTables/Buttons-1.5.6/js/buttons.bootstrap4.js
  32. +6 −0 assets/dataTables/Buttons-1.5.6/js/buttons.bootstrap4.min.js
  33. +213 −0 assets/dataTables/Buttons-1.5.6/js/buttons.colVis.js
  34. +10 −0 assets/dataTables/Buttons-1.5.6/js/buttons.colVis.min.js
  35. +1,456 −0 assets/dataTables/Buttons-1.5.6/js/buttons.flash.js
  36. +39 −0 assets/dataTables/Buttons-1.5.6/js/buttons.flash.min.js
  37. +88 −0 assets/dataTables/Buttons-1.5.6/js/buttons.foundation.js
  38. +6 −0 assets/dataTables/Buttons-1.5.6/js/buttons.foundation.min.js
  39. +1,459 −0 assets/dataTables/Buttons-1.5.6/js/buttons.html5.js
  40. +35 −0 assets/dataTables/Buttons-1.5.6/js/buttons.html5.min.js
  41. +62 −0 assets/dataTables/Buttons-1.5.6/js/buttons.jqueryui.js
  42. +6 −0 assets/dataTables/Buttons-1.5.6/js/buttons.jqueryui.min.js
  43. +210 −0 assets/dataTables/Buttons-1.5.6/js/buttons.print.js
  44. +9 −0 assets/dataTables/Buttons-1.5.6/js/buttons.print.min.js
  45. +57 −0 assets/dataTables/Buttons-1.5.6/js/buttons.semanticui.js
  46. +6 −0 assets/dataTables/Buttons-1.5.6/js/buttons.semanticui.min.js
  47. +1,966 −0 assets/dataTables/Buttons-1.5.6/js/dataTables.buttons.js
  48. +45 −0 assets/dataTables/Buttons-1.5.6/js/dataTables.buttons.min.js
  49. BIN assets/dataTables/Buttons-1.5.6/swf/flashExport.swf
  50. +187 −0 assets/dataTables/DataTables-1.10.18/css/dataTables.bootstrap.css
  51. +1 −0 assets/dataTables/DataTables-1.10.18/css/dataTables.bootstrap.min.css
  52. +206 −0 assets/dataTables/DataTables-1.10.18/css/dataTables.bootstrap4.css
  53. +1 −0 assets/dataTables/DataTables-1.10.18/css/dataTables.bootstrap4.min.css
  54. +118 −0 assets/dataTables/DataTables-1.10.18/css/dataTables.foundation.css
  55. +1 −0 assets/dataTables/DataTables-1.10.18/css/dataTables.foundation.min.css
  56. +481 −0 assets/dataTables/DataTables-1.10.18/css/dataTables.jqueryui.css
  57. +1 −0 assets/dataTables/DataTables-1.10.18/css/dataTables.jqueryui.min.css
  58. +102 −0 assets/dataTables/DataTables-1.10.18/css/dataTables.semanticui.css
  59. +1 −0 assets/dataTables/DataTables-1.10.18/css/dataTables.semanticui.min.css
  60. +448 −0 assets/dataTables/DataTables-1.10.18/css/jquery.dataTables.css
  61. +1 −0 assets/dataTables/DataTables-1.10.18/css/jquery.dataTables.min.css
  62. BIN assets/dataTables/DataTables-1.10.18/images/sort_asc.png
  63. BIN assets/dataTables/DataTables-1.10.18/images/sort_asc_disabled.png
  64. BIN assets/dataTables/DataTables-1.10.18/images/sort_both.png
  65. BIN assets/dataTables/DataTables-1.10.18/images/sort_desc.png
  66. BIN assets/dataTables/DataTables-1.10.18/images/sort_desc_disabled.png
  67. +182 −0 assets/dataTables/DataTables-1.10.18/js/dataTables.bootstrap.js
  68. +8 −0 assets/dataTables/DataTables-1.10.18/js/dataTables.bootstrap.min.js
  69. +184 −0 assets/dataTables/DataTables-1.10.18/js/dataTables.bootstrap4.js
  70. +8 −0 assets/dataTables/DataTables-1.10.18/js/dataTables.bootstrap4.min.js
  71. +174 −0 assets/dataTables/DataTables-1.10.18/js/dataTables.foundation.js
  72. +8 −0 assets/dataTables/DataTables-1.10.18/js/dataTables.foundation.min.js
  73. +164 −0 assets/dataTables/DataTables-1.10.18/js/dataTables.jqueryui.js
  74. +9 −0 assets/dataTables/DataTables-1.10.18/js/dataTables.jqueryui.min.js
  75. +212 −0 assets/dataTables/DataTables-1.10.18/js/dataTables.semanticui.js
  76. +9 −0 assets/dataTables/DataTables-1.10.18/js/dataTables.semanticui.min.js
  77. +15,296 −0 assets/dataTables/DataTables-1.10.18/js/jquery.dataTables.js
  78. +166 −0 assets/dataTables/DataTables-1.10.18/js/jquery.dataTables.min.js
  79. +9,155 −0 assets/dataTables/JSZip-2.5.0/jszip.js
  80. +14 −0 assets/dataTables/JSZip-2.5.0/jszip.min.js
  81. +374 −0 assets/dataTables/datatables.css
  82. +78,839 −0 assets/dataTables/datatables.js
  83. +18 −0 assets/dataTables/datatables.min.css
  84. +320 −0 assets/dataTables/datatables.min.js
  85. +50,468 −0 assets/dataTables/pdfmake-0.1.36/pdfmake.js
  86. +3 −0 assets/dataTables/pdfmake-0.1.36/pdfmake.min.js
  87. +6 −0 assets/dataTables/pdfmake-0.1.36/vfs_fonts.js
  88. BIN assets/fonts/glyphicons-halflings-regular.eot
  89. BIN assets/fonts/glyphicons-halflings-regular.ttf
  90. BIN assets/fonts/glyphicons-halflings-regular.woff
  91. BIN assets/img/mobil/brg-1555602539.JPG
  92. BIN assets/img/mobil/brg-1555602595.JPG
  93. BIN assets/img/mobil/brg-1555602644.JPG
  94. +4 −0 assets/js/custom-data.js
@@ -23,7 +23,7 @@
| a PHP script and you can easily do that on your own.
|
*/
$config['base_url'] = 'http://localhost/system-kdo/';
$config['base_url'] = 'http://localhost/KDO/';
/*
|--------------------------------------------------------------------------
@@ -16,6 +16,10 @@ public function index()
$data['motorBaik']=$this->user_m->getCount("Baik", 'tbl_motor');
$data['mobilRusak']=$this->user_m->getCount("Rusak", 'tbl_mobil');
$data['mobilBaik']=$this->user_m->getCount("Baik", 'tbl_mobil');
$data['mServicebengkel']=$this->user_m->getCount("Service Bengkel", 'tbl_mobil');
$data['mServiceatpm']=$this->user_m->getCount("Service ATPM", 'tbl_mobil');
$data['mtrServicebengkel']=$this->user_m->getCount("Service Bengkel", 'tbl_motor');
$data['mtrServiceatpm']=$this->user_m->getCount("Service ATPM", 'tbl_motor');
$this->template->load('template', 'dashboard', $data);
}
}
@@ -42,7 +42,7 @@ public function add() {
} else {
$post = $this->input->post(null, TRUE);
$this->mobil_m->add($post);
if($this->db->affected_rows() > 1) {
if($this->db->affected_rows() > 0) {
echo "<script>
alert('Data berhasil disimpan');
</script>";
@@ -76,9 +76,9 @@ public function edit($id) {
} else {
$post = $this->input->post(null, TRUE);
$this->mobil_m->edit($post);
if($this->db->affected_rows() > 1) {
if($this->db->affected_rows() > 0) {
echo "<script>
alert('Data berhasil disimpan');
alert('Perubahan data berhasil disimpan');
</script>";
} echo "<script>
window.location='".site_url('mobil')."';
@@ -7,30 +7,26 @@ function __construct() {
parent::__construct();
check_not_login();
$this->load->model('motor_m');
$this->load->library('form_validation');
}
public function index() {
$data['row']=$this->motor_m->get();
$this->template->load('template', 'motor/motor_data', $data);
}
public function edit() {
$this->template->load('template', 'motor/motor_form_edit');
}
public function del() {
$id = $this->input->post('id_motor');
$this->motor_m->del($id);
if($this->db->affected_rows() > 0){
echo "<script>alert('Data berhasil dihapus');</script>";
}
echo "<script>window.location='".site_url('motor')."';</script>";
}
public function add() {
$this->load->library('form_validation');
$this->form_validation->set_rules('platnomer', 'Plat Nomer', 'required|is_unique[tbl_motor.plat_no]',
array('is_unique' => '%s sudah terpakai')
);
@@ -55,4 +51,49 @@ public function add() {
</script>";
}
}
public function edit($id) {
$this->form_validation->set_rules('platnomer', 'Plat Nomer', 'required|callback_plotNomor_check');
$this->form_validation->set_rules('nomermesin', 'Nomer Mesin', 'required');
$this->form_validation->set_rules('nomerrangka', 'Nomer Rangka', 'required');
$this->form_validation->set_rules('sektor', 'Sektor', 'required');
$this->form_validation->set_rules('keterangan', 'keterangan', 'required');
// message if required
$this->form_validation->set_message('required', '{field} masih kosong, silahkan isi');
if ($this->form_validation->run() == FALSE) {
$query = $this->motor_m->get($id);
if ($query->num_rows() > 0) {
$data['row'] = $query->row();
$this->template->load('template', 'motor/motor_form_edit', $data);
} else {
echo "<script>
alert('data tidak ditemukan');
window.location='".site_url('motor')."';
</script>";
}
} else {
$post = $this->input->post(null, TRUE);
$this->motor_m->edit($post);
if($this->db->affected_rows() > 0) {
echo "<script>
alert('Perubahan data berhasil disimpan');
</script>";
} echo "<script>
window.location='".site_url('motor')."';
</script>";
}
}
public function plotNomor_check($str){
$post = $this->input->post(null, TRUE);
$query = $this->db->query("SELECT * FROM tbl_motor WHERE id_motor = '$post[idmotor]' AND plat_no != '$post[platnomer]'");
if ($query->num_rows() > 0) {
$this->form_validation->set_message('plotNomor_check', '{field} ini sudah dipakai');
return FALSE;
} else {
return TRUE;
}
}
}
@@ -25,6 +25,18 @@ public function add($post) {
$params['merk_motor'] = $post['merkmotor'] != "" ? $post['merkmotor'] : null;
$params['keterangan'] = $post['keterangan'];
$this->db->insert('tbl_motor', $params);
}
public function edit($post) {
$params['plat_no'] = $post['platnomer'];
$params['no_mesin'] = $post['nomermesin'];
$params['no_rangka'] = $post['nomerrangka'];
$params['sektor'] = $post['sektor'];
$params['tipe_motor'] = $post['tipemotor'] != "" ? $post['tipemotor'] : null;
$params['merk_motor'] = $post['merkmotor'] != "" ? $post['merkmotor'] : null;
$params['keterangan'] = $post['keterangan'];
$this->db->where('id_motor', $post['idmotor']);
$this->db->update('tbl_motor', $params);
}
}

0 comments on commit f24d2d7

Please sign in to comment.
You can’t perform that action at this time.