<?php

class ColorController extends Zend_Controller_Action {

	public function init() {		
		$this->view->menuSel = 6;
	}	
	
	
	public function indexAction() {			
		$v = $this->_request->getParams();
		
		if( !isset($v['id']) ){
			$idCategory = 0;
		}else{
			$idCategory = $v['id'];
		}		
		
		$this->view->idCategory = $idCategory;
		
		$Color = new Color();		
		$data = $Color->fetchAll('category_id = '.$idCategory , 'color_name ASC');
		$this->view->dataTable = $data;
	}

}
