public function searchLogBookAction()
 {
     $form = new Form_LogBook();
     $log_book = new Model_LogBook();
     $locations = new Model_Locations();
     if ($this->_request->isPost()) {
         $res = $this->_request->getPost();
         $log_book->form_values = $res;
         if (!empty($res['entry_type'])) {
             $form->entry_type->setValue($res['entry_type']);
         }
         if (!empty($res['province'])) {
             $form->province->setValue($res['province']);
         }
         $locations->form_values['province_id'] = $res['province'];
         if (!empty($res['province'])) {
             $districts = $locations->getDistrictsByProvince();
             $districtarray[] = 'Select';
             foreach ($districts as $dist) {
                 $districtarray[$dist['pkId']] = $dist['locationName'];
             }
             $form->district->setMultiOptions($districtarray);
             $form->district->setValue($res['district']);
         }
         $locations->form_values['district_id'] = $res['district'];
         if (!empty($res['district'])) {
             $tehsils = $locations->getTehsilsByDistrict();
             $tehsilarray[] = 'Select';
             foreach ($tehsils as $teh) {
                 $tehsilarray[$teh['pkId']] = $teh['locationName'];
             }
             $form->tehsil->setMultiOptions($tehsilarray);
             $form->tehsil->setValue($res['tehsil']);
         }
         $locations->form_values['tehsil_id'] = $res['tehsil'];
         if (!empty($res['tehsil'])) {
             $ucs = $locations->getUcsByTehsil();
             $ucarray[] = 'Select';
             foreach ($ucs as $uc) {
                 $ucarray[$uc['pkId']] = $uc['locationName'];
             }
             if (!empty($ucarray)) {
                 $form->uc->setMultiOptions($ucarray);
                 $form->uc->setValue($res['uc']);
             }
         }
         $form->vaccination_date_from->setValue($res['vaccination_date_from']);
         $form->vaccination_date_to->setValue($res['vaccination_date_to']);
     }
     $arr_data = $log_book->getSearchLogBook();
     $item_pack_sizes = new Model_ItemPackSizes();
     $items = $item_pack_sizes->logBookItemPackSize();
     $this->view->items = $items;
     $this->view->arr_data = $arr_data;
     $this->view->form = $form;
     $data = $this->_request->getParam("voucher", "");
     if (!empty($data)) {
         $string = substr($data, 1);
         list($voucher, $master_id) = explode("|", base64_decode($string));
         $this->view->voucher = $voucher;
         $this->view->master_id = $master_id;
     }
 }