Esempio n. 1
0
 /**
  * Get filelist
  */
 public function filelist()
 {
     $files = Files::file_list(Input::get('module_name'), Input::get('module_id'));
     $data = array();
     $data['html'] = View::make('sections.file.file_list')->with(array('module_name' => Input::get('module_name'), 'module_id' => Input::get('module_id'), 'num' => Input::get('num'), 'files' => $files))->render();
     return $data;
 }
Esempio n. 2
0
            $_SESSION['curdir'] = $new_dir;
            $_SESSION['dirdeep'] = $_SESSION['dirdeep'] - 1;
        }
    } else {
        $new_dir = $_SESSION['curdir'] . '/' . $directory;
        $_SESSION['curdir'] = $new_dir;
    }
}
// Update total dirs deep
if (!$back_set) {
    $_SESSION['dirdeep'] = $_SESSION['dirdeep'] + 1;
}
// Going back in tpl browser, force reset
if ($new_dir == '.') {
    // Unset current dir
    $_SESSION['curdir'] = '';
    $_SESSION['dirdeep'] = '0';
    $new_dir = '';
}
// Get and display list of files
$file_list = $Files->file_list($url_id, $new_dir, $tpl_brws);
if (GPXDEBUG && !is_array($file_list)) {
    echo 'DEBUG: ' . $file_list . '<br />';
}
if (GPXDEBUG) {
    echo 'DEBUG: Dumping file list ...<br />';
    echo '<pre>';
    var_dump($file_list);
    echo '</pre>';
}
$Files->displaydir($file_list, $url_id, $new_dir, $tpl_brws);
Esempio n. 3
0
 public static function projectsList($data)
 {
     if ($data['page']->feed_id) {
         Post::$taxonomy = 2;
         $item = Input::get('item');
         $wdata['page_url'] = $data['page_url'];
         if ($item) {
             $post = Post::findURI($item, 1);
             if ($post) {
                 Post::oneView($post->id);
                 WebAPL\Template::setMetaMultiple(array('description' => $post->text, 'og:description' => $post->text, 'og:title' => $post->title), true);
                 $wdata["post"] = Post::withDinamicFields($post);
                 $wdata["post_files"] = Files::file_list('doc_post_lang', $wdata["post"]->post_lang_id);
                 $data["page"]->text .= View::make("sections.pages.modview.project")->with($wdata);
             } else {
                 throw new Exception("Undefined article '{$item}'", 404);
             }
         } else {
             $wdata["posts"] = Post::postsFeed($data['page']->feed_id, false);
             $data["page"]->text .= View::make("sections.pages.modview.projectsList")->with($wdata);
         }
     }
     return static::defaultView($data);
 }
Esempio n. 4
0
<?php

require 'checkallowed.php';
// No direct access
// URL ID
$url_id = $GPXIN['id'];
$gpx_srvid = $url_id;
require DOCROOT . '/checkallowed.php';
// Check login/ownership
// Show Server Tabs
$tab = 'files';
require 'server_tabs.php';
########################################################################
// Unset current dir
$_SESSION['curdir'] = '';
$_SESSION['dirdeep'] = '0';
// Get list of files
require DOCROOT . '/includes/classes/files.php';
$Files = new Files();
$file_list = $Files->file_list($url_id, false);
// Show directory display
$result = $Files->displaydir($file_list, $url_id);
Esempio n. 5
0
 public static function dropMultiple($module_name, $module_id)
 {
     foreach (Files::file_list($module_name, $module_id) as $file) {
         Files::dropFile($file->path, $file->id);
         Files::destroy($file->id);
     }
 }