public function commonviewAction()
 {
     //Acl
     /*        $access = new App_Model_Access();
             $checkaccess = $access->accessRights('Fundings',$this->view->globalvalue[0]['name'],'viewfundingsAction');
            	if (($checkaccess != NULL)) {*/
     $id = $this->_request->getParam("id");
     $this->view->id = $id;
     $fundings = new Fundings_Model_Fundings();
     $this->view->fundings = $fundings->viewfundings($id);
     $this->view->address = $this->view->adm->getModule("ourbank_address", $id, "Management", "Fundings");
     $this->view->contact = $this->view->adm->getModule("ourbank_contact", $id, "Management", "Fundings");
     //         } else {
     // 			$this->_redirect('index/error');
     //         }
 }
 public function editfundingsAction()
 {
     $this->view->title = 'Edit Fundings';
     //Acl
     //         $access = new App_Model_Access();
     //         $checkaccess = $access->accessRights('Fundings',$this->view->glourbankalvalue[0]['name'],'editfundingsAction');
     //        	if (($checkaccess != NULL)) {
     $form = new Fundings_Form_Fundings();
     $this->view->form = $form;
     $fundings = new Fundings_Model_Fundings();
     $funder = $this->view->adm->viewRecord("ourbank_funder", "id", "DESC");
     foreach ($funder as $funder) {
         $form->funder_id->addMultiOption($funder['id'], $funder['name']);
     }
     $currency = $this->view->adm->viewRecord("ourbank_master_currency", "id", "DESC");
     foreach ($currency as $currency) {
         $form->currency_id->addMultiOption($currency['id'], $currency['name']);
     }
     if ($this->_request->isPost() && $this->_request->getPost('Update')) {
         if ($this->_request->isPost()) {
             $formData = $this->_request->getPost();
             if ($form->isValid($formData)) {
                 $id = $this->_request->getParam("id");
                 $editfundings = $this->view->adm->editRecord("ourbank_funding", $id);
                 $this->view->adm->updateLog("ourbank_funding_log", $editfundings[0], 1);
                 //update
                 $this->view->adm->updateRecord("ourbank_funding", $id, $form->getValues());
                 $this->_redirect("/fundings");
                 //$this->_redirect('/fundingscommonview/index/commonview/id/'.$this->_request->getPost('funding_id'));
             }
         }
     } else {
         $this->view->id = $this->_request->getParam("id");
         $fundings = new Fundings_Model_Fundings();
         $editfundings = $fundings->viewfundings($this->view->id);
         $form->populate($editfundings[0]);
     }
     // 	} else {
     // 	     $this->_redirect('index/index');
     //
     // 	}
 }