コード例 #1
0
 public function actionAmbilData()
 {
     if (Yii::app()->request->isAjaxRequest) {
         $result = $this->retrieveData();
         if (is_array($result)) {
             $insert = $this->insertPerdetik($result);
             if ($insert == true) {
                 $this->deleteAllData();
             }
         }
         echo AturpresensiM::getStatusAutoRefresh();
         Yii::app()->end();
     }
 }
コード例 #2
0
ファイル: admin.php プロジェクト: nelitaaas/Tugas-Besar
<div class="search-form" >
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->
<p>
<div class="mws-panel">
    <div class="mws-panel-header">
        <span class="mws-i-24 i-table-1">Tabel Presensi</span>
    </div>
    <div class="mws-panel-body">
        <div class="mws-panel-toolbar top clearfix">
            <ul>
                <li><a class="mws-ic-16 ic-add" href="index.php?r=kepegawaian/presensiT/create">Tambah Presensi</a></li>
                <li><a class="mws-i-24"><?php 
echo CHtml::checkBox('atur', AturpresensiM::getStatusAutoRefresh(), array('style' => 'line-height:10px;', 'onchange' => "setAuto();return false;"));
?>
<label>Auto</label></a></li>
            </ul>
        </div>
        <div class="mws-table">
            
<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'kpresensi-t-grid', 'dataProvider' => $model->search(), 'columns' => array(array('header' => 'NIP', 'name' => 'no_fingerprint'), 'karyawan.nama_karyawan', 'tglpresensi', array('header' => 'Jam Presensi', 'type' => 'raw', 'value' => 'substr($data->tglpresensi,11,10)'), array('name' => 'statuskehadiran_id', 'filter' => CHtml::listData($model->StatusItems, 'statuskehadiran_id', 'statuskehadiran_nama'), 'value' => '$data->statuskehadiran->statuskehadiran_nama'))));
?>
              </div>
        
                <div class="mws-button-row" align="right">
                    <?php 
//                    echo CHtml::htmlButton(Yii::t('mds','{icon} PDF',array('{icon}'=>'<i class="icon-book icon-white"></i>')),array('class'=>'mws-button blue', 'type'=>'button','onclick'=>'print(\'PDF\')'))."&nbsp&nbsp";
//                    echo CHtml::htmlButton(Yii::t('mds','{icon} Excel',array('{icon}'=>'<i class="icon-pdf icon-white"></i>')),array('class'=>'mws-button green', 'type'=>'button','onclick'=>'print(\'EXCEL\')'))."&nbsp&nbsp";