public function __construct()
 {
     parent::__construct();
     $timeframeInactModel = new TimeframeModel();
     $selecttimeframeInact = $timeframeInactModel->getAllTimeInact();
     $arraytimeframeInact = array();
     foreach ($selecttimeframeInact as $selTF) {
         $arraytimeframeInact[$selTF->cdtimeframe] = $selTF->nmtimetype;
     }
     $timeframeChangeModel = new TimeframeModel();
     $selecttimeframeChange = $timeframeChangeModel->getAllTimeChange();
     $arraytimeframeChange = array();
     foreach ($selecttimeframeChange as $selTF) {
         $arraytimeframeChange[$selTF->cdtimeframe] = $selTF->nmtimetype;
     }
     // Aba Configuração Geral
     $this->_cdsystemconfiguration = new Zend_Form_Element_Hidden('cdsystemconfiguration');
     $this->_cdsystemconfiguration->setAttrib("id", "systemsettings_cdsystemconfiguration");
     $this->_cdsystemconfiguration->setDecorators($this->_decoratorsDefault);
     $this->_cdsystemconfiguration->setRequired(false);
     $this->_idlicensecompany = new Zend_Form_Element_Text('idlicensecompany');
     $this->_idlicensecompany->setAttrib("id", "systemsettings_idlicensecompany");
     $this->_idlicensecompany->setLabel("Razão Social");
     $this->_idlicensecompany->setDecorators($this->_decoratorsDefault);
     $this->_idlicensecompany->setRequired(false);
     $this->_idlicensekey = new Zend_Form_Element_Text('idlicensekey');
     $this->_idlicensekey->setAttrib("id", "systemsettings_idlicensekey");
     $this->_idlicensekey->setLabel("Chave de Licença");
     $this->_idlicensekey->setDecorators($this->_decoratorsDefault);
     $this->_idlicensekey->setRequired(false);
     $this->_nmlicensecompanyname = new Zend_Form_Element_Text('nmlicensecompanyname');
     $this->_nmlicensecompanyname->setAttrib("id", "systemsettings_nmlicensecompanyname");
     $this->_nmlicensecompanyname->setLabel("Nome Fantasia");
     $this->_nmlicensecompanyname->setDecorators($this->_decoratorsDefault);
     $this->_nmlicensecompanyname->setRequired(false);
     $this->_idcurrency = new Zend_Form_Element_Text('idcurrency');
     $this->_idcurrency->setAttrib("id", "systemsettings_idcurrency");
     $this->_idcurrency->setLabel("Símbolo da Moeda");
     $this->_idcurrency->setDecorators($this->_decoratorsDefault);
     $this->_idcurrency->setRequired(false);
     $this->_nrinacttime = new Zend_Form_Element_Text('nrinacttime');
     $this->_nrinacttime->setAttrib("id", "systemsettings_nrinacttime");
     $this->_nrinacttime->setAttrib("class", "numeric");
     $this->_nrinacttime->setLabel("Controle");
     $this->_nrinacttime->setDecorators($this->_decoratorsDefault);
     $this->_nrinacttime->setRequired(false);
     $this->_cdtimeframeinact = new Zend_Form_Element_Select('cdtimeframeinact');
     $this->_cdtimeframeinact->setAttrib("id", "systemsettings_cdtimeframeinact");
     $this->_cdtimeframeinact->setMultiOptions($arraytimeframeInact);
     $this->_cdtimeframeinact->setLabel("Inatividade");
     $this->_cdtimeframeinact->setDecorators($this->_decoratorsDefault);
     $this->_cdtimeframeinact->setRegisterInArrayValidator(true);
     $this->_cdtimeframeinact->setRequired(true);
     $this->_nmurlsystem = new Zend_Form_Element_Text('nmurlsystem');
     $this->_nmurlsystem->setAttrib("id", "systemsettings_nmurlsystem");
     $this->_nmurlsystem->setLabel("URL de Acesso ao Sistema");
     $this->_nmurlsystem->setDecorators($this->_decoratorsDefault);
     $this->_nmurlsystem->setRequired(true);
     $this->_nrloginblockattempts = new Zend_Form_Element_Text('nrloginblockattempts');
     $this->_nrloginblockattempts->setAttrib("id", "systemsettings_nrloginblockattempts");
     $this->_nrloginblockattempts->setAttrib("class", "numeric");
     $this->_nrloginblockattempts->setLabel(" ");
     $this->_nrloginblockattempts->setDecorators($this->_decoratorsDefault);
     $this->_nrloginblockattempts->setRequired(false);
     $this->_nrchangepwdtimeframe = new Zend_Form_Element_Text('nrchangepwdtimeframe');
     $this->_nrchangepwdtimeframe->setAttrib("id", "systemsettings_nrchangepwdtimeframe");
     $this->_nrchangepwdtimeframe->setAttrib("class", "numeric");
     $this->_nrchangepwdtimeframe->setLabel(" ");
     $this->_nrchangepwdtimeframe->setDecorators($this->_decoratorsDefault);
     $this->_nrchangepwdtimeframe->setRequired(false);
     $this->_cdtimeframechangepwd = new Zend_Form_Element_Select('cdtimeframechangepwd');
     $this->_cdtimeframechangepwd->setAttrib("id", "systemsettings_cdtimeframechangepwd");
     $this->_cdtimeframechangepwd->setMultiOptions($arraytimeframeChange);
     $this->_cdtimeframechangepwd->setLabel("");
     $this->_cdtimeframechangepwd->setDecorators($this->_decoratorsDefault);
     $this->_cdtimeframechangepwd->setRegisterInArrayValidator(true);
     $this->_cdtimeframechangepwd->setRequired(true);
     $this->_idadminpassword = new Zend_Form_Element_Text('idadminpassword');
     $this->_idadminpassword->setAttrib("id", "systemsettings_idadminpassword");
     $this->_idadminpassword->setLabel("Nova Senha");
     $this->_idadminpassword->setValue("");
     $this->_idadminpassword->setDecorators($this->_decoratorsDefault);
     $this->_idadminpassword->setRequired(false);
     $this->_confirmidadminpassword = new Zend_Form_Element_Text('confirmidadminpassword');
     $this->_confirmidadminpassword->setAttrib("id", "systemsettings_confirmnewpassword");
     $this->_confirmidadminpassword->setLabel("Confirmar Nova Senha");
     $this->_confirmidadminpassword->setDecorators($this->_decoratorsDefault);
     $this->_confirmidadminpassword->setRequired(false);
     // Notificações
     $this->_nmdefaultemail = new Zend_Form_Element_Text('nmdefaultemail');
     $this->_nmdefaultemail->setAttrib("id", "systemsettings_nmdefaultemail");
     $this->_nmdefaultemail->setLabel("e-mail padrão para envio de mensagens");
     $this->_nmdefaultemail->setDecorators($this->_decoratorsDefault);
     $this->_nmdefaultemail->setRequired(false);
     $this->_idmailserver = new Zend_Form_Element_Text('idmailserver');
     $this->_idmailserver->setAttrib("id", "systemsettings_idmailserver");
     $this->_idmailserver->setLabel("Servidor");
     $this->_idmailserver->setDecorators($this->_decoratorsDefault);
     $this->_idmailserver->setRequired(false);
     $this->_nrmailserverport = new Zend_Form_Element_Text('nrmailserverport');
     $this->_nrmailserverport->setAttrib("id", "systemsettings_nrmailserverport");
     $this->_nrmailserverport->setLabel("Porta");
     $this->_nrmailserverport->setDecorators($this->_decoratorsDefault);
     $this->_nrmailserverport->setRequired(false);
     $this->_nmemailuser = new Zend_Form_Element_Text('nmemailuser');
     $this->_nmemailuser->setAttrib("id", "systemsettings_nmemailuser");
     $this->_nmemailuser->setLabel("Usuário");
     $this->_nmemailuser->setDecorators($this->_decoratorsDefault);
     $this->_nmemailuser->setRequired(false);
     $this->_idemailpassword = new Zend_Form_Element_Text('idemailpassword');
     $this->_idemailpassword->setAttrib("id", "systemsettings_idemailpassword");
     $this->_idemailpassword->setLabel("Senha");
     $this->_idemailpassword->setDecorators($this->_decoratorsDefault);
     $this->_idemailpassword->setRequired(false);
 }
 public function editAction()
 {
     $cdexamination = $this->_request->getParam('cdexamination');
     $modelMaterial = new MaterialModel();
     //$materialData = $modelMaterial->fetchAll();
     //   $materialData = $modelMaterial->fetchAll($modelMaterial->getMaterialNotInExamination($cdexamination));
     //         print_r('ei'); die;
     //   $this->view->materialData = $materialData;
     $departmentModel = new DepartmentModel();
     $departmentsData = $departmentModel->fetchAll($departmentModel->getAllActiveDepartment());
     $this->view->departmentsData = $departmentsData;
     $timeFrameModel = new TimeframeModel();
     $timeFrameData = $timeFrameModel->fetchAll($timeFrameModel->getAllTimeFrames());
     $this->view->timeFrameData = $timeFrameData;
     $examinationModel = new ExaminationModel();
     $examinationData = $examinationModel->fetchRow($examinationModel->getByExamination($cdexamination));
     $this->view->examinationData = $examinationData;
     $userModel = new UserModel();
     $userData = $userModel->fetchAll();
     $this->view->userData = $userData;
     $examinationRevisionModel = new ExaminationrevisionModel();
     $examinationRevisionData = $examinationRevisionModel->fetchRow($examinationRevisionModel->getByExaminationRevision($cdexamination));
     //      print_r($examinationRevisionData); die;
     $this->view->examinationRevisionData = $examinationRevisionData;
     //var_dump($examinationData);
     //die();
 }