public function viewpopupAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     Zend_Layout::getMvcInstance()->setLayoutPath(APPLICATION_PATH . "/layouts/scripts/popup/");
     $cand_model = new Default_Model_Candidatedetails();
     $requi_model = new Default_Model_Requisition();
     $jobtitleModel = new Default_Model_Jobtitles();
     $intrvwModel = new Default_Model_Interviewdetails();
     $interview_round_model = new Default_Model_Interviewrounddetails();
     $user_model = new Default_Model_Usermanagement();
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $jobtitle = '';
     $deptid = $this->getRequest()->getParam('deptid');
     if ($deptid == '') {
         $deptid = $this->getRequest()->getParam('deptidform');
     }
     $intId = $this->getRequest()->getParam('unitId');
     $roundId = $this->getRequest()->getParam('id');
     $ir_form = new Default_Form_Interviewrounds();
     $elements = $ir_form->getElements();
     //giving only for hr,management and super admin
     if ($loginuserGroup == HR_GROUP || $loginuserGroup == '' || $loginuserGroup == MANAGEMENT_GROUP) {
         $ir_form->round_status->addMultiOptions(array('Decision pending' => 'Decision pending', 'On hold' => 'On hold'));
     }
     if (count($elements) > 0) {
         foreach ($elements as $key => $element) {
             if ($key != "Cancel" && $key != "Edit" && $key != "Delete" && $key != "Attachments") {
                 $element->setAttrib("disabled", "disabled");
             }
         }
     }
     $intData = $intrvwModel->getReqByintrvwID($intId);
     $roundData = $interview_round_model->getSingleRoundData($roundId);
     $this->view->ermsg = '';
     $edit_flag = 'no';
     if ($roundData['interviewer_id'] == $loginUserId) {
         $edit_flag = 'yes';
     }
     if ($loginuserGroup == MANAGER_GROUP || $loginuserGroup == HR_GROUP || $loginuserGroup == MANAGEMENT_GROUP || $loginuserGroup == '' || $loginuserGroup == EMPLOYEE_GROUP || $loginuserGroup == SYSTEMADMIN_GROUP) {
         $countryId = $roundData['int_country'];
         $stateId = $roundData['int_state'];
         $cityId = $roundData['int_city'];
         $country_name = '';
         $state_name = '';
         $city_name = '';
         if ($countryId && $stateId) {
             $statesmodel = new Default_Model_States();
             $citiesmodel = new Default_Model_Cities();
             $countryModal = new Default_Model_Countries();
             $countriesData = $countryModal->fetchAll('isactive=1', 'country');
             foreach ($countriesData as $cdata) {
                 if ($roundData['int_country'] == $cdata['country_id_org']) {
                     $country_name = $cdata['country'];
                     break;
                 }
             }
             $statesData = $statesmodel->getBasicStatesList($countryId);
             $citiesData = $citiesmodel->getBasicCitiesList($stateId);
             foreach ($statesData as $res) {
                 $ir_form->state->addMultiOption($res['state_id_org'], utf8_encode($res['state']));
                 if ($roundData['int_state'] == $res['state_id_org']) {
                     $state_name = $res['state'];
                 }
             }
             foreach ($citiesData as $res) {
                 $ir_form->city->addMultiOption($res['city_org_id'], utf8_encode($res['city']));
                 if ($roundData['int_city'] == $res['city_org_id']) {
                     $city_name = $res['city'];
                 }
             }
         }
         $interviewer_data = $user_model->getUserDataById($roundData['interviewer_id']);
         $jobttlArr = $jobtitleModel->getsingleJobTitleData($interviewer_data['jobtitle_id']);
         if (!empty($jobttlArr) && $jobttlArr != 'norows') {
             $jobtitle = ', ' . $jobttlArr[0]['jobtitlename'];
             $data['jobtitlename'] = $jobttlArr[0]['jobtitlename'];
         }
         $ir_form->interviewer_id->addMultiOptions(array('' => $interviewer_data['userfullname'] . $jobtitle));
         $roundData['interview_date'] = sapp_Global::change_date($roundData['interview_date'], 'view');
         $roundData['interview_time'] = sapp_Global::change_time($roundData['interview_time'], 'view');
         $ir_form->populate($roundData);
         $this->view->form = $ir_form;
         $this->view->intId = $intId;
         $this->view->deptid = $deptid;
         $this->view->roundId = $roundId;
         $this->view->ermsg = '';
         $this->view->country_name = $country_name;
         $this->view->state_name = $state_name;
         $this->view->city_name = $city_name;
         $this->view->edit_flag = $edit_flag;
     } else {
         $this->view->ermsg = 'nodata';
     }
 }