This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| function json_response($message = null, $code = 200) | |
| { | |
| // clear the old headers | |
| header_remove(); | |
| // set the actual code | |
| http_response_code($code); | |
| // set the header to make sure cache is forced | |
| header("Cache-Control: no-transform,public,max-age=300,s-maxage=900"); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| /* | |
| * In configuration file | |
| * ... | |
| * 'as AccessBehavior' => [ | |
| * 'class' => '\app\components\AccessBehavior' | |
| * ] | |
| * ... | |
| * (c) Artem Voitko <r3verser@gmail.com> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| /* | |
| * In configuration file | |
| * ... | |
| * 'as AccessBehavior' => [ | |
| * 'class' => 'app\components\AccessBehavior', | |
| * 'allowedRoutes' => [ | |
| * '/', | |
| * ['/user/registration/register'], | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | \*-----view----*/ | |
| use yii\bootstrap\modal; | |
| \*-----id'=>'modalButton' untuk mengambil id dari js/main.js yang sudah di definisikan di asset----*/ | |
| <?= Html::button('Create Kodepos', ['value'=>url::to('index.php?r=kodepos/create'),'class' => 'btn btn-success','id'=>'modalButton']) ?> | |
| \*----untuk membuat header kodepos di atas form popup dengan ukuran <h4></h4>-----*/ | |
| <?php | |
| Modal::begin([ | |
| 'header'=>'<h4>KodePos</h4>', | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public function inportResult() { | |
| /* echo '<pre>'; | |
| print_r($_FILES); | |
| exit; */ | |
| $config['upload_path'] = 'upload'; | |
| $config['allowed_types'] = 'text/plain|text/anytext|csv|text/x-comma-separated-values|text/comma-separated-values|application/octet-stream|application/vnd.ms-excel|application/x-csv|text/x-csv|text/csv|application/csv|application/excel|application/vnd.msexcel'; | |
| $this->load->library('upload', $config); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | //Found on: https://stackoverflow.com/questions/15725814/upload-an-image-from-camera-or-gallery-in-webview | |
| private ValueCallback<Uri> mUploadMessage; | |
| private Uri mCapturedImageURI = null; | |
| private ValueCallback<Uri[]> mFilePathCallback; | |
| private String mCameraPhotoPath; | |
| private static final int INPUT_FILE_REQUEST_CODE = 1; | |
| private static final int FILECHOOSER_RESULTCODE = 1; | |
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | { | |
| // The plugin looks for a .jsbeautifyrc file in the same directory as the | |
| // source file you're prettifying (or any directory above if it doesn't exist, | |
| // or in your home folder if everything else fails) and uses those options | |
| // along the default ones. | |
| // Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options | |
| // Documentation: https://github.com/einars/js-beautify/ | |
| "html": { | |
| "allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg", "dust"], | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| /** | |
| * Convert date/time format between `date()` and `strftime()` | |
| * | |
| * Timezone conversion is done for Unix. Windows users must exchange %z and %Z. | |
| * | |
| * Unsupported date formats : S, n, t, L, B, G, u, e, I, P, Z, c, r | |
| * Unsupported strftime formats : %U, %W, %C, %g, %r, %R, %T, %X, %c, %D, %F, %x | |
| * | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| // Run from the command line, so we'll grab arguments from there | |
| // input arguments: 0=>script, 1=>file_name, 2=>temp_file | |
| $file_name = $argv[1]; | |
| $temp_file = $argv[2]; | |
| $uploads = '/opt/lampp/htdocs/user_uploads/'; | |
| // Set up file location strings | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package | |
| { | |
| /** | |
| * ActionScript 3.0 Code Snippet | |
| * Convert Number to Rupiah & vice versa | |
| * https://gist.github.com/845309 | |
| * | |
| * Copyright 2011-2012, Faisalman | |
| * Licensed under The MIT License | |
| * http://www.opensource.org/licenses/mit-license |