public function viewAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserRole = $auth->getStorage()->read()->emprole;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $id = $this->getRequest()->getParam('id');
     if (is_numeric($id) && $id > 0) {
         $projectsModel = new Default_Model_Createprojects();
         $data = $projectsModel->getProjectDataByIDForView($id);
         if (!empty($data)) {
             foreach ($data as $key => $val) {
                 $data[$key] = htmlentities($val, ENT_QUOTES, "UTF-8");
             }
             $testdata = $projectsModel->getProjectTasks($id);
             if (!empty($testdata)) {
                 $this->view->projecttaskslist = sapp_Global::_convertArrayToHTMLTable("leavecardtablegrid", "Project Tasks", $projectsModel->getProjectTasks($id));
             } else {
                 $this->view->projecttaskslist = sapp_Global::_convertArrayForNoHTMLData("leavecardtablegrid", "Project Tasks", $testdata);
             }
             $this->view->data = $data;
             $this->view->id = $id;
             $this->view->controllername = "createprojects";
             $this->view->ermsg = '';
             $this->view->loginuserGroup = $loginuserGroup;
         } else {
             $this->view->ermsg = 'nodata';
         }
     } else {
         $this->view->ermsg = 'nodata';
     }
 }