NG1NDEX
Server IP : 103.233.192.212  /  Your IP : 3.149.10.88
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/newsCouncilMainFile.php
<?php 
$baseUrl = Yii::app()->baseUrl; // call base_url
$cs = Yii::app()->getClientScript(); // call client script

$cs->registerCssFile($baseUrl . '/js/fancyBox/jquery.fancybox.css');
$cs->registerScriptFile($baseUrl . '/js/fancyBox/jquery.fancybox.js');
?>

<script type="text/javascript">
$(function(){
    
    // delete file
    $('.btn-delete-file').click(function() {
        if(confirm('ต้องการลบข้อมูลไฟล์นี้') != false) {
            var parent = $(this).attr('rel');
            $.ajax({
                type: 'get',
                url: '<?php echo Yii::app()->controller->createUrl('NewsCouncilDeleteFile'); ?>',
                data: 'delete=' + parent,
                success: function(data) {
                    $('#tr-file_'+parent).fadeOut(300, function() {
                        $(this).remove();
                    })
                } // end success
            });
        }
    })
    
    // delete pic
    $('.btn-delete-pic').click(function() {
        if(confirm('ต้องการลบข้อมูลรูปนี้') != false) {
            var parent = $(this).attr('rel');
            $.ajax({
                type: 'get',
                url: '<?php echo Yii::app()->controller->createUrl('NewsCouncilDeletePic'); ?>',
                data: 'delete=' + parent,
                success: function(data) {
                    $('#tr-pic_'+parent).fadeOut(300, function() {
                        $(this).remove();
                    })
                } // end success
            });
        }
    })

    $('.import-file').click(function() {
        $('.progressBar').css({'display':'block'});
    })
    
    // view images    
    $(".fancybox").fancybox();
})
</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('NewsCouncilEdit', array('id' => $primaryID)); ?>">
                    <i class="icon-chevron-left"></i>&nbsp;ย้อนกลับ
                </a>
                <span>ส่วนจัดการ ข้อมูลไฟล์</span>
            </legend>
            
            <?php $this->widget('bootstrap.widgets.TbTabs', array(
                'type' => 'tabs',
                'placement' => 'left',
                'tabs' => array(
                    array('label'=>'เพิ่มข้อมูลไฟล์', 'content'=>$this->renderPartial('_newsCouncilAddFileView', array("id" => $primaryID), true), 'active'=>true),
                    array('label'=>'เพิ่มข้อมูลรูป', 'content'=>$this->renderPartial('_newsCouncilAddPicView', array("id" => $primaryID), true)),
                ),
            )); ?>
        </fieldset>

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

                <?php if (sizeof($modelFile) == 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 ($modelFile as $valueFile) { ?>
                            <tr id="tr-file_<?php echo $valueFile->id; ?>">
                                <td width="100" style="text-align: center;">
                                    <a class="btn-delete-file" href="#" rel="<?php echo $valueFile->id; ?>">
                                        <span>ลบไฟล์</span></a>
                                </td>
                                <td>
                                    <a href="<?php echo Yii::app()->baseUrl . OtherFunction::pathFile('newscouncil_file') . $valueFile->path_file; ?>" target="_blank">
                                        <?php echo $valueFile->file_name; ?>
                                    </a>
                                </td>
                            </tr>
                        <?php } ?>
                    </table>
                <?php } // end if sizeof   ?>

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

                <?php if (sizeof($modelPic) == 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 ($modelPic as $valuePic) { ?>
                            <tr id="tr-pic_<?php echo $valuePic->id; ?>">
                                <td width="100" style="text-align: center;">
                                    <a class="btn-delete-pic" href="#" rel="<?php echo $valuePic->id; ?>">
                                        <span>ลบไฟล์</span></a>
                                </td>
                                <td>
                                    <a class="fancybox" href="<?php echo Yii::app()->baseUrl . OtherFunction::pathFile('newscouncil_image') . $valuePic->path_pic; ?>" target="_blank">
                                        <?php echo $valuePic->file_name; ?>
                                    </a>
                                </td>
                            </tr>
                        <?php } ?>
                    </table>
                <?php } // end if sizeof   ?>

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

    </div>
</div>

Anon7 - 2022
AnonSec Team