public function actionPropinsi()
 {
     if (Yii::app()->request->isAjaxRequest) {
         $criteria = new CDbCriteria();
         $criteria->compare('LOWER(propinsi_nama)', strtolower($_GET['term']), true);
         $models = PropinsiM::model()->findAll($criteria);
         foreach ($models as $model) {
             $returnVal[] = array('label' => $model->propinsi_nama, 'value' => $model->propinsi_nama, 'propinsi_id' => $model->propinsi_id);
         }
         echo CJSON::encode($returnVal);
     }
     Yii::app()->end();
 }
Ejemplo n.º 2
0
 public function actionPenerimaanKaryawan()
 {
     $model = new KPelamarT();
     $modelpro = PropinsiM::model()->findAll();
     $model->propinsi_id = Params::DEFAULT_PROPINSI_ID;
     $model->kabupatenkota_id = Params::DEFAULT_KABUPATEN_ID;
     //                $model->lokasi_id = Params::DEFAULT_LOKASI;
     $model->warganegara_pelamar = Params::DEFAULT_WARGA_NEGARA;
     $model->tglditerima = date('Y-m-d');
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['KPelamarT'])) {
         $random = rand(00, 999999);
         $model->attributes = $_POST['KPelamarT'];
         $model->karyawan_aktif = 1;
         $model->Create_User_Id = Yii::app()->session['loginpemakai_id'];
         $model->Create_Time = date('y-m-d H:m:s');
         $model->photopelamar = CUploadedFile::getInstance($model, 'photopelamar');
         $model->fileCV_Pelamar = CUploadedFile::getInstance($model, 'fileCV_Pelamar');
         $gambar = $model->photopelamar;
         $file = $model->fileCV_Pelamar;
         if (!empty($model->photopelamar)) {
             $model->photopelamar = $random . $model->photopelamar;
             Yii::import("ext.EPhpThumb.EPhpThumb");
             $thumb = new EPhpThumb();
             $thumb->init();
             // this is needed
             $fullImgName = $model->photopelamar;
             $fullImgSource = Params::pathIconModulDirectory() . $fullImgName;
             $fullThumbSource = Params::pathIconModulThumbsDirectory() . 'kecil_' . $fullImgName;
             if ($model->validate()) {
                 if ($model->save()) {
                     $gambar->saveAs($fullImgSource);
                     if (isset($model->fileCV_Pelamar)) {
                         $file->saveAs(Params::pathIconModulDirectory() . $model->fileCV_Pelamar);
                     }
                     $thumb->create($fullImgSource)->resize(200, 200)->save($fullThumbSource);
                     $this->redirect(array('view', 'id' => $model->pelamar_id));
                 }
             }
         } else {
             if ($model->validate()) {
                 if ($model->save()) {
                     $this->redirect(array('admin', 'id' => $model->pelamar_id));
                 }
             }
         }
     }
     echo $model->tglmulaibekerja;
     $this->render('create', array('model' => $model, 'modelpro' => $modelpro));
 }
Ejemplo n.º 3
0
?>
</div><!-- search-form -->
<p>
<div class="mws-panel">
    <div class="mws-panel-header">
        <span class="mws-i-24 i-table-1">Tabel Kabupaten / Kota</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/kabupatenkotaM/create">Tambah Kabupaten / Kota</a></li>
            </ul>
        </div>
        <div class="mws-table">
<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'kabupatenkota-m-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('header' => 'ID Kab / Kota', 'name' => 'kabupatenkota_id', 'value' => '$data->kabupatenkota_id'), array('header' => 'Propinsi', 'name' => 'propinsi_id', 'filter' => CHtml::listData(PropinsiM::model()->findAll(), 'propinsi_id', 'propinsi_nama'), 'value' => 'isset($data->propinsi->propinsi_nama) ? $data->propinsi->propinsi_nama : ""'), array('header' => 'Nama Kab / Kota', 'name' => 'kabupatenkota_nama', 'value' => '$data->kabupatenkota_nama'), array('header' => 'Aktif', 'class' => 'CCheckBoxColumn', 'selectableRows' => 0, 'id' => 'rows', 'checked' => '$data->kabupatenkota_aktif'), array('header' => 'Lihat', 'class' => 'CButtonColumn', 'template' => '{view}'), array('header' => 'Ubah', 'class' => 'CButtonColumn', 'template' => '{update}'), array('header' => 'Delete', 'class' => 'CButtonColumn', 'template' => '{delete}'))));
?>
              </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";
echo CHtml::htmlButton(Yii::t('mds', '{icon} Print', array('{icon}' => '<i class="icon-print icon-white"></i>')), array('class' => 'mws-button orange', 'type' => 'button', 'onclick' => 'print(\'PRINT\')')) . "&nbsp&nbsp";
///echo CHtml::htmlButton(Yii::t('mds','{icon} Petunjuk',array('{icon}'=>'<i class="icon-print icon-white"></i>')),array('class'=>'mws-button yellow', 'type'=>'button','id'=>'clickme'))."&nbsp&nbsp";
?>
                </div><br>
                 <div id ="ptjk" class="mws-form-message info" style="display: none;">
                    <p>
                    You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
                    or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
Ejemplo n.º 4
0
 public function getPropinsiItems()
 {
     return PropinsiM::model()->findAllByAttributes(array('propinsi_aktif' => true), array('order' => 'propinsi_nama'));
 }
Ejemplo n.º 5
0
if ($form->errorSummary($model)) {
    echo '<div class="mws-form-message error">' . $form->errorSummary($model) . '</div>';
}
?>
        
                <div class="mws-form-inline">   
                    <table>
                        <tr>
                            <td>  
                                <div class="mws-form-row">
                                     <?php 
echo $form->labelEx($model, 'propinsi_id');
?>
                                     <div class="mws-form-item ">                                        
                                          <?php 
echo $form->dropDownList($model, 'propinsi_id', CHtml::listData(PropinsiM::model()->findAll(), 'propinsi_id', 'propinsi_nama'), array('empty' => '', 'style' => 'width:120px;'));
?>
                                     </div>
                                </div>

                                <div class="mws-form-row">
                                     <?php 
echo $form->labelEx($model, 'kabupatenkota_nama');
?>
                                     <div class="mws-form-item ">                                        
                                          <?php 
echo $form->textField($model, 'kabupatenkota_nama', array('size' => 15, 'maxlength' => 50, 'onkeypress' => 'return $(this).focusNextInputField(event);', 'class' => 'mws-textinput'));
?>
                                     </div>
                                </div>
Ejemplo n.º 6
0
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = PropinsiM::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }