public function show_category($directory = null) { $page = 1; if (isset($_GET['page'])) { $page = $_GET['page']; } if (!$directory && isset($_GET['directory'])) { $directory = $_GET['directory']; } $paginate = File::find_all("files/" . $directory, $page, 20); $categories = File::find_all_categories("files/" . $directory); $this->assign("this_category", $directory); $this->assign("categories", $categories); $this->assign("page", $paginate); $this->assign("category", $directory); $this->title = "File Category: '{$directory}'"; $this->render("file/show.tpl"); }
<?php require_once "../../includes/initialize.php"; $files = File::find_all(); include_layout_template('admin_header.php'); ?> <h2>Files</h2> <?php echo output_message($message); ?> <a href="logout.php">Logout</a> <table class="list_file"> <tr> <th>Image</th> <th>Filename</th> <th>Size</th> <th>Type</th> <th>User</th> <th> </th> </tr> <?php foreach ($files as $file) { ?> <tr> <td><img src="../<?php echo $file->image_path(); ?> " width="100" /></td> <td><?php