public function indexAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserRole = $auth->getStorage()->read()->emprole;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $orgInfoModel = new Default_Model_Organisationinfo();
     $getorgData = $orgInfoModel->getorgrecords();
     $addpermission = sapp_Global::_checkprivileges(ORGANISATIONINFO, $loginuserGroup, $loginuserRole, 'add');
     $viewpermission = sapp_Global::_checkprivileges(ORGANISATIONINFO, $loginuserGroup, $loginuserRole, 'view');
     $editpermission = sapp_Global::_checkprivileges(ORGANISATIONINFO, $loginuserGroup, $loginuserRole, 'edit');
     $this->view->addpermission = $addpermission;
     $this->view->editpermission = $editpermission;
     if (!empty($getorgData)) {
         $id = $getorgData[0]['id'];
         $data = $getorgData[0];
         $head_data = $orgInfoModel->getorghead_details();
         $data['orghead'] = isset($head_data['head_name']) ? $head_data['head_name'] : "";
         $data['jobtitle'] = isset($head_data['jobtitle_name']) ? $head_data['jobtitle_name'] : "";
         $countryId = $data['country'];
         $stateId = $data['state'];
         $cityId = $data['city'];
         $countriesmodel = new Default_Model_Countries();
         $statesmodel = new Default_Model_States();
         $citiesmodel = new Default_Model_Cities();
         if ($countryId != '') {
             try {
                 $countryData = $countriesmodel->getsingleCountriesData($countryId, 'main');
                 $data['country'] = $countryData['country'];
             } catch (Exception $e) {
                 $data['country'] = 'No country';
             }
         }
         if ($stateId != '') {
             try {
                 $stateData = $statesmodel->getsingleStatesData($stateId, 'main');
                 $data['state'] = $stateData['state'];
             } catch (Exception $e) {
                 $data['state'] = 'No state';
             }
         }
         if ($cityId != '') {
             try {
                 $citiesData = $citiesmodel->getsingleCitiesData($cityId, 'main');
                 $data['city'] = $citiesData['city'];
             } catch (Exception $e) {
                 $data['city'] = 'No city';
             }
         }
         $data['org_startdate'] = sapp_Global::change_date($data['org_startdate'], 'view');
         if ($data['totalemployees'] == 1) {
             $data['totalemployees'] = '20-50';
         } else {
             if ($data['totalemployees'] == 2) {
                 $data['totalemployees'] = '51-100';
             } else {
                 if ($data['totalemployees'] == 3) {
                     $data['totalemployees'] = '101-500';
                 } else {
                     if ($data['totalemployees'] == 4) {
                         $data['totalemployees'] = '501 -1000';
                     } else {
                         $data['totalemployees'] = '> 1000';
                     }
                 }
             }
         }
         $organizationImg = new Zend_Session_Namespace('organizationinfo');
         if (!empty($data['org_image'])) {
             $organizationImg->orgimg = $data['org_image'];
         }
         $data['address1'] = htmlentities($data['address1'], ENT_QUOTES, "UTF-8");
         $data['address2'] = htmlentities($data['address2'], ENT_QUOTES, "UTF-8");
         $data['address3'] = htmlentities($data['address3'], ENT_QUOTES, "UTF-8");
         $this->view->dataArray = $data;
         $this->view->messages = $this->_helper->flashMessenger->getMessages();
         $this->view->role = $loginuserRole;
         $this->view->ermsg = '';
         if ($loginuserGroup == MANAGEMENT_GROUP || $loginuserGroup == HR_GROUP) {
             if ($viewpermission != 'Yes') {
                 $this->view->ermsg = 'noview';
             }
         }
     } else {
         $this->view->ermsg = 'nodata';
     }
 }