Spaces:
Running
Running
Download application/views/v_help/v_task_request/task_request1.php from cappucaine/ERP: direct link, hf CLI and curl.
- Browser
- Download file 15.8 kB
-
https://huggingface.co/spaces/cappucaine/ERP/resolve/main/application/views/v_help/v_task_request/task_request1.php
- Command line
-
hf download hf://spaces/cappucaine/ERP/application/views/v_help/v_task_request/task_request1.php
-
curl -L -o task_request1.php https://huggingface.co/spaces/cappucaine/ERP/resolve/main/application/views/v_help/v_task_request/task_request1.php
15.8 kB
| /* | |
| * Author = Dian Hermanto | |
| * Create Date = 29 Mei 2017 | |
| * File Name = sync_db.php | |
| * Location = - | |
| */ | |
| $this->load->view('template/head'); | |
| $appName = $this->session->userdata('appName'); | |
| $this->load->view('template/topbar'); | |
| $this->load->view('template/sidebar'); | |
| // _global function | |
| $this->db->select('Display_Rows,decFormat'); | |
| $resGlobal = $this->db->get('tglobalsetting')->result(); | |
| foreach($resGlobal as $row) : | |
| $Display_Rows = $row->Display_Rows; | |
| $decFormat = $row->decFormat; | |
| endforeach; | |
| $decFormat = 2; | |
| $FlagUSER = $this->session->userdata['FlagUSER']; | |
| $DefEmp_ID = $this->session->userdata['Emp_ID']; | |
| $TBL_NAME = ''; | |
| return false; | |
| if(isset($_POST['submitSync'])) | |
| { | |
| $TBL_NAME = $_POST['TBL_NAME']; | |
| //if($TBL_NAME == 'DPHD' || $TBL_NAME == 'ALL') | |
| //{ | |
| // DP_HD | |
| // CEK NEW STATUS | |
| $IMP_N = "SELECT KOLOM0, KOLOM1, KOLOM2, KOLOM21, KOLOM22, KOLOM3, KOLOM4, KOLOM5, KOLOM6, KOLOM7 | |
| FROM tbl_import"; | |
| $ResIMP_N = $this->db->query($IMP_N)->result(); | |
| $theRow = 0; | |
| foreach($ResIMP_N as $rowIMP_N) : | |
| $theRow = $theRow + 1; | |
| $KOLOM1 = $rowIMP_N->KOLOM1; // EMP_ID | |
| $KOLOM7 = $rowIMP_N->KOLOM7; // ID NO | |
| $IMP_CN = "tbl_employee WHERE Emp_ID = '$KOLOM1'"; | |
| $ResIMP_CN = $this->db->count_all($IMP_CN); | |
| if($ResIMP_CN > 0) | |
| { | |
| $UPD_IMP_N = "UPDATE tbl_employee SET EmpNoIdentity = '$KOLOM7' WHERE Emp_ID = '$KOLOM1'"; | |
| $this->db->query($UPD_IMP_N); | |
| echo "$theRow = update<br>"; | |
| } | |
| else | |
| { | |
| echo "$theRow = input<br>"; | |
| $KOLOM2 = $rowIMP_N->KOLOM2; // NAMA AWAL | |
| $KOLOM21 = $rowIMP_N->KOLOM21; // NAMA TENGAH | |
| $KOLOM22 = $rowIMP_N->KOLOM22; // NAMA AKHIR | |
| if($KOLOM21 == '' && $KOLOM22 == '') | |
| $KOLOM23= ""; // NAMA AKHIR | |
| elseif($KOLOM21 != '' && $KOLOM22 == '') | |
| $KOLOM23= "$KOLOM21"; // NAMA AKHIR | |
| elseif($KOLOM21 != '' && $KOLOM22 != '') | |
| $KOLOM23= "$KOLOM21 $KOLOM22"; // NAMA AKHIR | |
| $KOLOM3 = $rowIMP_N->KOLOM3; // PROYEK | |
| $KOLOM4 = $rowIMP_N->KOLOM4; // DIVISI | |
| $KOLOM5 = $rowIMP_N->KOLOM5; // TMP. LAHIR | |
| $KOLOM6 = $rowIMP_N->KOLOM6; // TGL. LAHIR | |
| // INSERT NEW | |
| $INS_IMP_N = "INSERT INTO tbl_employee | |
| (Emp_ID, EmpNoIdentity, Position_ID, First_Name, Last_Name, gender, Birth_Place, Email, Religion, Emp_DeptCode, log_username, log_passHint, log_password, FlagUSER, Employee_status, Emp_Location, writeEMP, editEMP, readEMP, new_stat) | |
| VALUES ('$KOLOM1', '$KOLOM7', 3, '$KOLOM2', '$KOLOM23', 'male', '$KOLOM5', 'mail.sample@nusakonstruksi.com', 'Islam', 6, '$KOLOM1', 'GENUSR', 'c33367701511b4f6020ec61ded352059', 'APPUSR', 1, 1, 0, 0, 1, 1)"; | |
| $this->db->query($INS_IMP_N); | |
| // INSERT EMP PROJ | |
| $INS_IMP_O = "INSERT INTO tbl_employee_proj (Emp_ID, proj_Code) VALUES ('$KOLOM1', 'KTR')"; | |
| $this->db->query($INS_IMP_O); | |
| // INSERT OTHER | |
| $INS_IMP_O = "INSERT INTO others (NK, U, P) VALUES ('$KOLOM1', '$KOLOM1', '654321')"; | |
| $this->db->query($INS_IMP_O); | |
| // INSERT MENU | |
| $INS_IMP_O = "INSERT INTO tusermenu (isChkDetail, emp_id, menu_code) VALUES (261, '$KOLOM1', 'MN268')"; | |
| $this->db->query($INS_IMP_O); | |
| } | |
| endforeach; | |
| //} | |
| } | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <style type="text/css">@import url("<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/css/style.css'; ?>");</style> | |
| <title> echo $appName; | Data Tables</title> | |
| <!-- Tell the browser to be responsive to screen width --> | |
| <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> | |
| <!-- Bootstrap 3.3.6 --> | |
| <link rel="stylesheet" href="<?php echo base_url() . 'assets/AdminLTE-2.0.5/bootstrap/css/bootstrapa.min.css'; ?>"> | |
| <!-- Font Awesome --> | |
| <link rel="stylesheet" href="<?php echo base_url() . 'assets/css/font-awesome.min.css'; ?>"> | |
| <!-- Ionicons --> | |
| <link rel="stylesheet" href="<?php echo base_url() . 'assets/css/ionicons.min.css'; ?>"> | |
| <link rel="stylesheet" href="<?php echo base_url() . 'assets/AdminLTE.min.css'; ?>"> | |
| <!-- DataTables --> | |
| <link rel="stylesheet" href="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/datatables/dataTables.bootstrap.css'; ?>"> | |
| <!-- Theme style --> | |
| <link rel="stylesheet" href="<?php echo base_url() . 'assets/AdminLTE-2.0.5/dist/css/AdminLTE.minaa.css'; ?>"> | |
| <!-- AdminLTE Skins. Choose a skin from the css/skins | |
| folder instead of downloading all of them to reduce the load. --> | |
| <link rel="stylesheet" href="<?php echo base_url() . 'assets/AdminLTE-2.0.5/dist/css/skins/_all-skins.min.css'; ?>"> | |
| <!-- Theme style --> | |
| <link rel="stylesheet" href="<?php echo base_url() . 'assets/AdminLTE.css'; ?>"> | |
| <!-- daterange picker --> | |
| <link rel="stylesheet" href="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/daterangepicker/daterangepicker.css'; ?>"> | |
| <!-- bootstrap datepicker --> | |
| <link rel="stylesheet" href="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/datepicker/datepicker3.css'; ?>"> | |
| <!-- iCheck for checkboxes and radio inputs --> | |
| <link rel="stylesheet" href="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/iCheck/all.css'; ?>"> | |
| <!-- Bootstrap Color Picker --> | |
| <link rel="stylesheet" href="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/colorpicker/bootstrap-colorpicker.min.css'; ?>"> | |
| <!-- Bootstrap time Picker --> | |
| <link rel="stylesheet" href="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/timepicker/bootstrap-timepicker.min.css'; ?>"> | |
| <!-- Ionicons --> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css"> | |
| <!-- DataTables --> | |
| <link rel="stylesheet" href="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/datatables/dataTables.bootstrap.css'; ?>"> | |
| <!-- Select2 --> | |
| <link rel="stylesheet" href="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/select2/select2.min.css'; ?>"> | |
| <!-- Theme style --> | |
| <link rel="stylesheet" href="<?php echo base_url() . 'assets/AdminLTE-2.0.5/dist/css/AdminLTE.min.css'; ?>"> | |
| <!-- AdminLTE Skins. Choose a skin from the css/skins | |
| folder instead of downloading all of them to reduce the load. --> | |
| <link rel="stylesheet" href="<?php echo base_url() . 'assets/AdminLTE-2.0.5/dist/css/skins/_all-skins.min.css'; ?>"> | |
| <link href="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/iCheck/flat/blue.css') ?>" rel="stylesheet" type="text/css" /> | |
| <!-- Morris chart --> | |
| <link href="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/morris/morris.css') ?>" rel="stylesheet" type="text/css" /> | |
| <!-- jvectormap --> | |
| <link href="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/jvectormap/jquery-jvectormap-1.2.2.css') ?>" rel="stylesheet" type="text/css" /> | |
| <!-- Date Picker --> | |
| <link href="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/datepicker/datepicker3.css') ?>" rel="stylesheet" type="text/css" /> | |
| <!-- Daterange picker --> | |
| <link href="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/daterangepicker/daterangepicker-bs3.css') ?>" rel="stylesheet" type="text/css" /> | |
| <!-- bootstrap wysihtml5 - text editor --> | |
| <link href="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>" rel="stylesheet" type="text/css" /> | |
| <link rel="stylesheet" href="<?php echo base_url('assets/css/ilmudetil.css') ?>"> | |
| <script src="<?php echo base_url('assets/js/jquery-1.10.1.min.js') ?>" type="text/javascript"></script> | |
| <script src="<?php echo base_url('assets/js/highcharts.js') ?>" type="text/javascript"></script> | |
| <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> | |
| <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> | |
| <!--[if lt IE 9]> | |
| <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> | |
| <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> | |
| <![endif]--> | |
| </head> | |
| <body class="hold-transition skin-blue sidebar-mini"> | |
| <!-- Content Header (Page header) --> | |
| <section class="content-header"> | |
| <h1> | |
| <?php echo $h2_title; ?> | |
| <small><?php echo $h3_title; ?></small> | |
| </h1> | |
| <?php /*?><ol class="breadcrumb"> | |
| <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li> | |
| <li><a href="#">Tables</a></li> | |
| <li class="active">Data tables</li> | |
| </ol><?php */?> | |
| </section> | |
| <!-- Main content --> | |
| <section class="content"> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <div class="box box-primary"> | |
| <div class="box-header with-border"> | |
| <div class="box-tools pull-right"> | |
| <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i> | |
| </button> | |
| <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button> | |
| </div> | |
| </div> | |
| <div class="box-body chart-responsive"> | |
| <form class="form-horizontal" name="frm" id="frm" method="post" action=""> | |
| <div class="form-group"> | |
| <label for="inputName" class="col-sm-2 control-label">Sync for Table</label> | |
| <div class="col-sm-10"> | |
| <select name="TBL_NAME" id="TBL_NAME" class="form-control" style="max-width:120px" > | |
| <option value="tbl_employee" <?php if($TBL_NAME == "tbl_employee") { ?> selected <?php } ?>>Employee</option> | |
| </select> | |
| </div> | |
| </div> | |
| <br> | |
| <div class="form-group"> | |
| <div class="col-sm-offset-2 col-sm-10"> | |
| <input type="submit" name="submitSync" id="submitSync" class="btn btn-primary" value="Sync Table" onClick="return buttonApp1(1)" > | |
| </div> | |
| </div> | |
| </form> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| </body> | |
| </html> | |
| <script language="javascript" src="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/jQuery/jquery-2.2.3.min.js'; ?>"></script> | |
| <script language="javascript" src="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/bootstrap/js/bootstrap.min.js'; ?>"></script> | |
| <script language="javascript" src="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/datatables/jquery.dataTables.min.js'; ?>"></script> | |
| <script language="javascript" src="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/datatables/dataTables.bootstrap.min.js'; ?>"></script> | |
| <script language="javascript" src="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/slimScroll/jquery.slimscroll.min.js'; ?>"></script> | |
| <script language="javascript" src="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/fastclick/fastclick.js'; ?>"></script> | |
| <script language="javascript" src="<?php echo base_url() . 'assets/AdminLTE/dist/js/demo.js'; ?>"></script> | |
| <!-- Select2 --> | |
| <script src="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/select2/select2.full.min.js'; ?>"></script> | |
| <!-- InputMask --> | |
| <script src="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/input-mask/jquery.inputmask.js'; ?>"></script> | |
| <script src="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/input-mask/jquery.inputmask.date.extensions.js'; ?>"></script> | |
| <script src="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/input-mask/jquery.inputmask.extensions.js'; ?>"></script> | |
| <!-- date-range-picker --> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"></script> | |
| <script src="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/daterangepicker/daterangepicker.js'; ?>"></script> | |
| <!-- bootstrap datepicker --> | |
| <script src="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/datepicker/bootstrap-datepicker.js'; ?>"></script> | |
| <!-- bootstrap color picker --> | |
| <script src="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/colorpicker/bootstrap-colorpicker.min.js'; ?>"></script> | |
| <!-- bootstrap time picker --> | |
| <script src="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/timepicker/bootstrap-timepicker.min.js'; ?>"></script> | |
| <!-- SlimScroll 1.3.0 --> | |
| <script src="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/slimScroll/jquery.slimscroll.min.js'; ?>"></script> | |
| <!-- iCheck 1.0.1 --> | |
| <script src="<?php echo base_url() . 'assets/AdminLTE-2.0.5/plugins/iCheck/icheck.min.js'; ?>"></script> | |
| <!-- Page script --> | |
| <script> | |
| $(function () { | |
| //Initialize Select2 Elements | |
| $(".select2").select2(); | |
| //Datemask dd/mm/yyyy | |
| $("#datemask").inputmask("dd/mm/yyyy", {"placeholder": "dd/mm/yyyy"}); | |
| //Datemask2 mm/dd/yyyy | |
| $("#datemask2").inputmask("mm/dd/yyyy", {"placeholder": "mm/dd/yyyy"}); | |
| //Money Euro | |
| $("[data-mask]").inputmask(); | |
| //Date range picker | |
| $('#reservation').daterangepicker(); | |
| //Date range picker with time picker | |
| $('#reservationtime').daterangepicker({timePicker: true, timePickerIncrement: 30, format: 'MM/DD/YYYY h:mm A'}); | |
| //Date range as a button | |
| $('#daterange-btn').daterangepicker( | |
| { | |
| ranges: { | |
| 'Today': [moment(), moment()], | |
| 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], | |
| 'Last 7 Days': [moment().subtract(6, 'days'), moment()], | |
| 'Last 30 Days': [moment().subtract(29, 'days'), moment()], | |
| 'This Month': [moment().startOf('month'), moment().endOf('month')], | |
| 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')] | |
| }, | |
| startDate: moment().subtract(29, 'days'), | |
| endDate: moment() | |
| }, | |
| function (start, end) { | |
| $('#daterange-btn span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY')); | |
| } | |
| ); | |
| //Date picker | |
| $('#datepicker1').datepicker({ | |
| autoclose: true | |
| }); | |
| //Date picker | |
| $('#datepicker2').datepicker({ | |
| autoclose: true | |
| }); | |
| //Date picker | |
| $('#datepicker3').datepicker({ | |
| autoclose: true | |
| }); | |
| //iCheck for checkbox and radio inputs | |
| $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({ | |
| checkboxClass: 'icheckbox_minimal-blue', | |
| radioClass: 'iradio_minimal-blue' | |
| }); | |
| //Red color scheme for iCheck | |
| $('input[type="checkbox"].minimal-red, input[type="radio"].minimal-red').iCheck({ | |
| checkboxClass: 'icheckbox_minimal-red', | |
| radioClass: 'iradio_minimal-red' | |
| }); | |
| //Flat red color scheme for iCheck | |
| $('input[type="checkbox"].flat-red, input[type="radio"].flat-red').iCheck({ | |
| checkboxClass: 'icheckbox_flat-green', | |
| radioClass: 'iradio_flat-green' | |
| }); | |
| //Colorpicker | |
| $(".my-colorpicker1").colorpicker(); | |
| //color picker with addon | |
| $(".my-colorpicker2").colorpicker(); | |
| //Timepicker | |
| $(".timepicker").timepicker({ | |
| showInputs: false | |
| }); | |
| }); | |
| </script> | |
| $this->load->view('template/js_data'); | |
| <!--tambahkan custom js disini--> | |
| $this->load->view('template/foot'); | |