Location: PHPKode > projects > DIY Blog > diy-blog/classes/diy-blog/backend/view/files/FilesView.class.php
<?php

include("FileReader.class.php");
include("File.class.php");

/**
 * File listing and uploading view.
 * @package diy-blog.backend.view.files
 * @author	Martynas Jusevicius <hide@address.com>
 * @link	http://www.xml.lt
 */

class FilesView extends BackEndView
{

	protected $criteria = null;
	
	public function __construct(Resource $resource = null)
	{
		parent::__construct($resource);
		$this->criteria = new Criteria();

		$this->template->load(APP_VIEW_DIR."files/Files.xsl");
	}

	public function display(Request $request, Response $response)
	{
		if ($request->getAttribute("file-result") != null)
		{
			$this->proc->setParameter("", "file-result", $request->getAttribute("file-result"));

			$this->resolver->setArgument("file-errors", XMLSerializer::serialize($request->getAttribute("file-errors")));
			$this->resolver->setArgument("file-form", XMLSerializer::serialize($request->getAttribute("file-form")));
		}
		$this->resolver->setArgument("files", XMLSerializer::serialize(FileReader::read("static/files")));

		parent::display($request, $response);
		$response->setStatus(Response::SC_OK);
	}

}

?>
Return current item: DIY Blog