<?php
/**
 * Node モジュール
 * 
 */
require_once 'Zend/Controller/Action.php';

class NodeController extends Zend_Controller_Action
{
    public $admin_email;
    
    public function indexAction()
    {
        global $config, $db;
        
        // id/[id]
        $request = $this->getRequest();
        $id = $request->getParam('id');
        
        ob_start();
        
        $sql = "SELECT type FROM Platy_Content_Base WHERE id={$id}";
        $row = $db->fetchRow($sql);
        
        $type = $row['type'];
        
        
        $contents = ob_get_contents();
        ob_end_clean();
        
        Zend_Loader::loadClass('Zend_View');
        $view = new Zend_View();
        $view->setScriptPath(APP_PATH . 'views');
        $view->contents = $contents;
        echo $view->render('page.php');
    }
    
    public function noRouteAction()
    {
        //$this->_redirect('/');
        echo "noRouteAction";
    }
}
?>