dreamjob/app/Controller/ServiceController.php

34 lines
1.1 KiB
PHP
Raw Normal View History

2014-05-15 19:38:25 +02:00
<?php
App::uses('AppController', 'Controller');
class ServiceController extends AppController {
2014-09-13 16:38:46 +02:00
public $uses = array('DreamjobService','DreamjobServiceCategory');
2014-05-15 19:38:25 +02:00
public function index() {
$this->MiconwareSession->init($this);
$this->MiconwareSession->initWeb($this);
$this->set('MENU_SERVICE', true);
2014-09-13 16:38:46 +02:00
$this->set('SERVICE_CATEGORY', $this->request->param('list'));
$this->set('category',$this->DreamjobServiceCategory->find('all'));
2014-05-15 19:38:25 +02:00
2014-09-13 16:38:46 +02:00
if($this->request->param('list'))
$this->set('list',$this->DreamjobService->find('all',array('conditions'=>array('DreamjobService.category'=>$this->request->param('list')))));
else
$this->set('list',$this->DreamjobService->find('all'));
$this->render('/Service/index');
2014-05-15 19:38:25 +02:00
}
2014-09-13 16:38:46 +02:00
public function show(){
2014-05-15 19:38:25 +02:00
$this->MiconwareSession->init($this);
$this->MiconwareSession->initWeb($this);
$this->set('MENU_SERVICE', true);
2014-09-13 16:38:46 +02:00
$this->set('obj',$this->DreamjobService->find('first',array('conditions'=>array('DreamjobService.id'=>$this->request->param('item')))));
$this->render('/Service/show');
2014-05-15 19:38:25 +02:00
}
}