コード例 #1
0
ファイル: get.php プロジェクト: akiyatkin/files
        return false;
    }
    return infra_theme($folder . $result);
}, array($fdata['path']), isset($_GET['re']));
$ans = array('src' => $isrc);
if (!$src) {
    if (!infra_isphp()) {
        header('HTTP/1.0 404 Not Found');
    }
    return;
}
$fdata = infra_srcinfo($src);
if (in_array($fdata['ext'], array('docx'))) {
    $txt = files\Docx::get($src);
    return Ans::txt($txt);
}
if (in_array($fdata['ext'], array('mht'))) {
    $txt = files\Mht::get($src);
    return Ans::txt($txt);
}
if (in_array($fdata['ext'], array('xls', 'xlsx'))) {
    $ans = files\Xlsx::get($src);
    return Ans::ans($ans);
}
if (in_array($fdata['ext'], array('tpl', 'html', 'htm', 'php'))) {
    $txt = infra_loadTEXT($src);
    return Ans::txt($txt);
}
if (!infra_isphp()) {
    header('HTTP/1.0 400 Bad Request');
}
コード例 #2
0
ファイル: list.php プロジェクト: akiyatkin/pages
 } else {
     $isobj = false;
 }
 if (isset($_GET['f'])) {
     //Файлы нужны?
     $f = (bool) $_GET['f'];
 } else {
     $f = true;
 }
 if (isset($_GET['sub'])) {
     //Заходить во вложенные папки?
     $sub = (bool) $_GET['sub'];
 } else {
     $sub = false;
 }
 if (infra_isphp() && @$_GET['h']) {
     $hidden = 1;
 } else {
     $hidden = 0;
 }
 if (isset($_GET['d'])) {
     //папки нужны?
     $d = (bool) $_GET['d'];
 } else {
     $d = false;
 }
 if (isset($_GET['s'])) {
     $s = (bool) $_GET['s'];
 } else {
     $s = false;
 }