Swal Message

networking

PAsang di Controller
Yii::app()->user->setFlash('sukses', 'Data Telah Disimpan');

Pasang di Index
<?php if(Yii::app()->user->hasFlash('sukses')):?>
  <script type='text/javascript'>
  swal.fire({
    title: 'Informasi',
    icon: 'success', 
    html: '<?php echo Yii::app()->user->getFlash("sukses"); ?>',
    timer: 3000,
    showConfirmButton: false
  });
  </script> 

<?php endif; ?>


 

Data Float

networking

<div class="form-group row">
     <label class="col-sm-3 col-form-label text-right"><b>ANGKA KREDIT BARU</b></label>
            <div class="col-sm-3  ">
                  <?php echo $form->textField($model,'kredit_baru',array('size'=>50,'type'=>'number','maxlength'=>7,
                   'data-validation'=>'number', 'data-validation-allowing'=>'float', 'data-validation-decimal-separator'=>'.',
                   'data-validation-error-msg-number'=>'Harap Diperbaiki','data-validation-optional'=>'true','data-validation- 
                    allowing'=>'range[0.000;999.999],float',
                   'class'=>'form-control')); ?>
           </div>
</div>
Replace coma with dot       
<script>
         jQuery(function($){
           $("input").keypress(function(event) {
             $(this).val($(this).val().replace(',', '.'));
           })
         });  
         </script>

 

 

Antisipasi Limit Connection FTP

networking

We allow 8 simultaneous connections from an IP at a time. If you receive this error, please do the following:

Quick Steps

Step 1: In FileZilla, go to File -> Site Manager
Step 2: Locate the Transfer Settings tab
Step 3: Click the checkbox next to “Limit number of simultaneous connections
Step 4: Change “Max number of connections” to ‘1
Step 5: Access cPanel -> Files -> FTP Connections and drop all idle connections by clicking disconnect button
Step 6: If you still get the error, switch off your modem/router and turn it back on
Step 7: If you still get the error, reboot your computer

Menghilangkan Tooltip Select2

networking

$(document).on('mouseenter', '.select2-selection__rendered', function () {
var tooltipId = $(this).attr("aria-describedby"); // contains the id of the tooltip
$("#" + tooltipId).hide(); // hide the tooltip before it fades in
$(this).unbind('mouseenter mouseleave'); // stop it showing another tooltip
});

 

  <style>
  .ui-autocomplete {
  position: absolute;
  z-index: 99999 !important;
  cursor: default;
  padding: 0;
  margin-top: 2px;
  list-style: none;
  background-color: #ffffff;
  border: 1px solid #ccc -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.ui-autocomplete>li {
  padding: 3px 20px;
}

.ui-autocomplete>li.ui-state-focus {
  background-color: #DDD;
}

.ui-helper-hidden-accessible {
  display: none;
}

 

Query Row

PHP

$data = Yii::app()->dc->createCommand("
        SELECT 
        *
        from table
        ")->queryrow();

foreach($data as $row )

{

    echo  $row["data"]  ;

}