public function recentlyviewed()
 {
     $request = Zend_Controller_Front::getInstance();
     $params = $request->getRequest()->getParams();
     $moduleName = $request->getRequest()->getModuleName();
     $controllerName = $request->getRequest()->getControllerName();
     $actionName = $request->getRequest()->getActionName();
     $mparams['module'] = $params['module'];
     $mparams['controller'] = $params['controller'];
     $mparams['action'] = $params['action'];
     $actionurl = '';
     $id_name = 'yes';
     $burl = $controllerName . "/" . $actionName;
     if ($actionName != '') {
         $actionurl = strstr($_SERVER['REQUEST_URI'], $actionName);
         $actionurl = str_replace($actionName, '', $actionurl);
     } else {
         if ($controllerName != '') {
             $actionurl = strstr($_SERVER['REQUEST_URI'], $controllerName);
             $actionurl = str_replace($actionName, '', $actionurl);
         } else {
             $actionurl = strstr($_SERVER['REQUEST_URI'], $moduleName);
             $actionurl = str_replace($actionName, '', $actionurl);
         }
     }
     $burl = $burl . $actionurl;
     $tmpPageLink = explode("/", $_SERVER['REQUEST_URI']);
     $pageName = $controllerName;
     $pageLink = $burl;
     $reportsArr = array('leavesreport' => '-' . TAB_EMP_LEAVES, 'leavemanagementreport' => '-Leave Management', 'holidaygroupreports' => '-' . TAB_EMP_HOLIDAYS, 'activeuser' => '-Active Users', 'employeereport' => '-Employees', 'rolesgroup' => '-Roles', 'emprolesgroup' => '-Employee Roles', 'userlogreport' => '-User Logs', 'activitylogreport' => '-Activity Logs', 'requisitionstatusreport' => '-Requisition', 'candidatesreport' => '-Candidates', 'interviewrounds' => '-Interview Rounds', 'agencylistreport' => '-Agency List', 'empscreening' => '-Employee Screening', 'businessunits' => '-Business Units', 'departments' => '-Departments');
     $emptabarr = array('dependencydetails' => TAB_EMP_DEPENDENCY, 'creditcarddetails' => TAB_EMP_CORPORATE_CARD, 'visaandimmigrationdetails' => TAB_EMP_VISA_EMIGRATION, 'workeligibilitydetails' => TAB_EMP_WORK_ELIGIBILITY, 'disabilitydetails' => TAB_EMP_DISABILITY, 'empcommunicationdetails' => TAB_EMP_CONTACT, 'empskills' => TAB_EMP_SKILLS, 'empleaves' => TAB_EMP_LEAVES, 'empholidays' => TAB_EMP_HOLIDAYS, 'medicalclaims' => TAB_EMP_MEDICAL_CLAIMS, 'educationdetails' => TAB_EMP_EDUCATION, 'experiencedetails' => TAB_EMP_EXPERIENCE, 'trainingandcertificationdetails' => TAB_EMP_TRAINING_CERTIFY, 'emppersonaldetails' => TAB_EMP_PERSONAL, 'empperformanceappraisal' => TAB_EMP_PERFORMANCE_APPRAISAL, 'emppayslips' => TAB_EMP_PAY_SLIPS, 'empbenefits' => TAB_EMP_BENEFITS, 'emprenumerationdetails' => TAB_EMP_REMUNERATION, 'empadditionaldetails' => TAB_EMP_ADDITIONAL, 'empsecuritycredentials' => TAB_EMP_SECURITY_CREDENTIALS, 'empsalarydetails' => TAB_EMP_SALARY, 'empjobhistory' => TAB_EMP_JOB_HISTORY, 'mydetails' => "", "myemployees" => "My Team", "userloginlog" => "User Log", "logmanager" => "Activity Log", "empconfiguration" => "Employee Tabs");
     $myemployees_arr = array('view' => '-View', 'trainingview' => '-' . TAB_EMP_TRAINING_CERTIFY, 'comview' => '-' . TAB_EMP_CONTACT, 'skillsview' => '-' . TAB_EMP_SKILLS, 'eduview' => '-' . TAB_EMP_EDUCATION, 'expview' => '-' . TAB_EMP_EXPERIENCE, 'perview' => '-' . TAB_EMP_PERSONAL, 'additionaldetailsview' => '-' . TAB_EMP_ADDITIONAL, 'jobhistoryview' => '-' . TAB_EMP_JOB_HISTORY);
     $myemployeesedit_arr = array('edit' => '-Edit', 'trainingedit' => '-' . TAB_EMP_TRAINING_CERTIFY, 'comedit' => '-' . TAB_EMP_CONTACT, 'skillsedit' => '-' . TAB_EMP_SKILLS, 'eduedit' => '-' . TAB_EMP_EDUCATION, 'expedit' => '-' . TAB_EMP_EXPERIENCE, 'peredit' => '-' . TAB_EMP_PERSONAL, 'additionaldetailsedit' => '-' . TAB_EMP_ADDITIONAL, 'jobhistoryedit' => '-' . TAB_EMP_JOB_HISTORY);
     $myDetailsEmployeesarr = array('mydetails', 'myemployees');
     $mydetails_arr = array('communicationdetailsview' => TAB_EMP_CONTACT . '-View', 'communication' => TAB_EMP_CONTACT . '-Edit', 'disabilitydetailsview' => TAB_EMP_DISABILITY . '-View', 'disability' => TAB_EMP_DISABILITY . '-Edit', 'workeligibilitydetailsview' => TAB_EMP_WORK_ELIGIBILITY . '-View', 'workeligibility' => TAB_EMP_WORK_ELIGIBILITY . '-Edit', 'visadetailsview' => TAB_EMP_VISA_EMIGRATION . '-View', 'visa' => TAB_EMP_VISA_EMIGRATION . '-Edit', 'creditcarddetailsview' => TAB_EMP_CORPORATE_CARD . '-View', 'creditcard' => TAB_EMP_CORPORATE_CARD . "-Edit", "additionaldetails" => TAB_EMP_ADDITIONAL . "-Edit", "additionaldetailsview" => TAB_EMP_ADDITIONAL . "-View", "salarydetails" => TAB_EMP_SALARY . "-Edit", "salarydetailsview" => TAB_EMP_SALARY . "-View", "personaldetailsview" => TAB_EMP_PERSONAL . "-View", "personal" => TAB_EMP_PERSONAL . "-Edit", "jobhistory" => TAB_EMP_JOB_HISTORY, "certification" => TAB_EMP_TRAINING_CERTIFY, "experience" => TAB_EMP_EXPERIENCE, "education" => TAB_EMP_EDUCATION, "medicalclaims" => TAB_EMP_MEDICAL_CLAIMS, "leaves" => TAB_EMP_LEAVES, "skills" => TAB_EMP_SKILLS, "dependency" => TAB_EMP_DEPENDENCY, "index" => TAB_EMP_OFFICIAL . "-View", "edit" => TAB_EMP_OFFICIAL . "-Edit");
     //The Logic used behind this functionality is we are using the object of zend session to store the action
     $recentlyViewed = new Zend_Session_Namespace('recentlyViewed');
     // Creating a new session with namespace
     if (!empty($recentlyViewed->recentlyViewedObject)) {
         echo '<div class="recentviewd"><label id="recentviewtext">Recently viewed</label><ul>';
         $rvSize = 0;
         if (sizeof($recentlyViewed->recentlyViewedObject) > 3) {
             $rvSize = 3;
             $recentlyViewed->recentlyViewedObject = array_slice($recentlyViewed->recentlyViewedObject, 1);
         } else {
             $rvSize = sizeof($recentlyViewed->recentlyViewedObject);
         }
         $menuName = '';
         $pagesplitName = '';
         for ($i = 0; $i < $rvSize; $i++) {
             $pagesplit = $recentlyViewed->recentlyViewedObject[$i];
             $pagesplitName = isset($pagesplit['controller_name']) ? $pagesplit['controller_name'] : "";
             $pagesplitLink = isset($pagesplit['url']) ? $pagesplit['url'] : "";
             $pagesplit_action = isset($pagesplit['action_name']) ? $pagesplit['action_name'] : "";
             $pagesplit_idname = isset($pagesplit['id_name']) ? $pagesplit['id_name'] : "";
             // Instead of url - display menu name for each list item
             if ($pagesplitName != 'dashboard' && $pagesplitName != 'welcome' && $pagesplitName != 'viewsettings') {
                 if (array_key_exists($pagesplitName, $emptabarr) !== false) {
                     $menuName = $emptabarr[$pagesplitName];
                 } else {
                     $selectQuery1 = "select m.menuName from main_menu m where m.url = '/" . $pagesplitName . "'";
                     $db = Zend_Db_Table::getDefaultAdapter();
                     $sql = $db->query($selectQuery1);
                     $resultarray = $sql->fetchAll();
                     if (!empty($resultarray)) {
                         $menuName = ucfirst($resultarray[0]['menuName']);
                     } else {
                         $menuName = ucfirst($pagesplitName);
                         if ($menuName == 'Appraisalstatus') {
                             $menuName = '';
                         }
                     }
                 }
             } else {
                 if ($pagesplitName == 'viewsettings') {
                     $flagnumber = substr($pagesplitLink, -1);
                     if ($flagnumber != '') {
                         if ($flagnumber == 1) {
                             $menuName = "Settings-Widgets";
                         } else {
                             if ($flagnumber == 2) {
                                 $menuName = "Settings-Shortcuts";
                             }
                         }
                     } else {
                         $menuName = "Settings";
                     }
                 } else {
                     $menuName = ucfirst($pagesplitName);
                 }
             }
             // Display of add, edit or view in each list item
             // Checking condition for my employee and my details static controllers
             if ($pagesplitName != '' && in_array($pagesplitName, $myDetailsEmployeesarr)) {
                 if ($pagesplit_action != '') {
                     if ($pagesplitName == 'myemployees') {
                         if (array_key_exists($pagesplit_action, $myemployees_arr) !== false) {
                             $menuName .= $myemployees_arr[$pagesplit_action];
                         } else {
                             if (array_key_exists($pagesplit_action, $myemployeesedit_arr) !== false) {
                                 $menuName .= $myemployeesedit_arr[$pagesplit_action];
                             } else {
                                 if ($actionName == 'add') {
                                     $menuName .= '-Add';
                                 }
                             }
                         }
                     } else {
                         if (array_key_exists($pagesplit_action, $mydetails_arr) !== false) {
                             $menuName .= $mydetails_arr[$pagesplit_action];
                         }
                     }
                 } else {
                     if ($pagesplit_action == '') {
                         if ($pagesplitName == 'mydetails') {
                             $menuName .= TAB_EMP_OFFICIAL . "-View";
                         }
                     } else {
                         $menuName .= '';
                     }
                 }
             } else {
                 if ($pagesplitName != '' && $pagesplitName == 'reports') {
                     if ($pagesplit_action != '') {
                         if (array_key_exists($pagesplit_action, $reportsArr) !== false) {
                             $menuName .= $reportsArr[$pagesplit_action];
                         }
                     }
                 } else {
                     if ($pagesplitName != '' && $pagesplitName == 'servicerequests') {
                         if ($pagesplit_action != '') {
                             $param_t = isset($pagesplit['t']) ? sapp_Global::_decrypt($pagesplit['t']) : "";
                             $param_v = isset($pagesplit['v']) ? sapp_Global::_decrypt($pagesplit['v']) : "";
                             $service_menu = sapp_Helper::sd_menu_names();
                             $service_action_arr = sapp_Helper::sd_action_names();
                             if ($param_t != '' && isset($service_menu[$param_t])) {
                                 $menuName .= " - " . $service_menu[$param_t];
                             }
                             if ($param_v != '' && isset($service_action_arr[$param_v])) {
                                 $menuName .= " - " . $service_action_arr[$param_v];
                             }
                         }
                     } else {
                         if ($pagesplitName != '' && $pagesplitName == 'appraisalinit') {
                             if ($pagesplit_action != '') {
                                 if ($pagesplit_action == 'edit') {
                                     $menuName .= '-Edit';
                                 }
                                 if ($pagesplit_action == 'view') {
                                     $menuName .= '-View';
                                 }
                                 if ($pagesplit_action == 'add') {
                                     $menuName .= '-Add';
                                 }
                                 if ($pagesplit_action == 'assigngroups') {
                                     $menuName .= '-Edit Questions';
                                 }
                                 if ($pagesplit_action == 'confmanagers') {
                                     $menuName .= '-Edit Managers';
                                 }
                                 if ($pagesplit_action == 'viewassigngroups') {
                                     $menuName .= '-View Questions';
                                 }
                                 if ($pagesplit_action == 'viewconfmanagers') {
                                     $menuName .= '-View Managers';
                                 }
                             }
                         } else {
                             if ($pagesplitName != '' && $pagesplitName == 'appraisalstatus') {
                                 if ($pagesplit_action != '') {
                                     if ($pagesplit_action == 'employee') {
                                         $menuName .= 'Employee Status';
                                     }
                                     if ($pagesplit_action == 'manager') {
                                         $menuName .= 'Manager Status';
                                     }
                                 }
                             } else {
                                 if ($pagesplit_action != '' && $pagesplitName != 'reports') {
                                     if ($pagesplit_action == 'add') {
                                         $menuName .= '-Add';
                                     } else {
                                         if ($pagesplit_action == 'edit' && $pagesplit_idname == 'yes') {
                                             $menuName .= '-Edit';
                                         } else {
                                             if ($pagesplit_action == 'edit') {
                                                 $menuName .= '-Add';
                                             } else {
                                                 if ($pagesplit_action == 'view') {
                                                     $menuName .= '-View';
                                                 } else {
                                                     if ($pagesplit_action == 'viewsettings') {
                                                         $menuName = 'Settings';
                                                     } else {
                                                         if ($pagesplit_action == 'viewprofile') {
                                                             $menuName = 'Profile';
                                                         } else {
                                                             if ($pagesplit_action == 'changepassword') {
                                                                 $menuName = 'Change password';
                                                             } else {
                                                                 if ($pagesplit_action == 'emailsettings') {
                                                                     $menuName = 'Email Settings';
                                                                 } else {
                                                                     if ($pagesplit_action == 'upgradeapplication') {
                                                                         $menuName = 'Upgrade Application';
                                                                     }
                                                                 }
                                                             }
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
             if ($menuName) {
                 echo '<li><span id="redirectlink"  title = "' . $menuName . '" onclick ="redirecttolink(\'' . $pagesplitLink . '\');">' . $menuName . '</span><a href="javascript:void(0);" onClick="closetab(this,\'' . $pagesplitName . '\',\'' . $pagesplitLink . '\')"></a></li>';
             }
         }
     }
     //end of display
     if (isset($recentlyViewed->recentlyViewedObject)) {
         if (sizeof($recentlyViewed->recentlyViewedObject) > 3 && $pageLink != DOMAIN && !in_array($pageName . "!@#" . $pageLink, $recentlyViewed->recentlyViewedObject)) {
             array_shift($recentlyViewed->recentlyViewedObject);
         }
         if ($pageName != 'public' && $pageName != 'welcome' && $controllerName != 'error') {
             if (!in_array('PIE.htc', $tmpPageLink)) {
                 if ($pageLink != DOMAIN && $controllerName != 'index' && $actionName != 'welcome') {
                     if ($this->recentlyviewed_helper($pageLink, $recentlyViewed->recentlyViewedObject) === true) {
                         if ($controllerName == 'servicerequests') {
                             array_push($recentlyViewed->recentlyViewedObject, array('url' => $burl, 'controller_name' => $controllerName, 'action_name' => $actionName, 'id_name' => $id_name, 't' => isset($params['t']) ? $params['t'] : "", 'v' => isset($params['v']) ? $params['v'] : ""));
                         } else {
                             array_push($recentlyViewed->recentlyViewedObject, array('url' => $burl, 'controller_name' => $controllerName, 'action_name' => $actionName, 'id_name' => $id_name));
                         }
                     }
                 }
             }
         }
     } else {
         $recentlyViewed->recentlyViewedObject = array();
         if ($pageLink != DOMAIN && $controllerName != 'index' && $actionName != 'welcome' && $controllerName != 'error' && !in_array('PIE.htc', $tmpPageLink)) {
             if ($this->recentlyviewed_helper($pageLink, $recentlyViewed->recentlyViewedObject) === true) {
                 if ($controllerName == 'servicerequests') {
                     array_push($recentlyViewed->recentlyViewedObject, array('url' => $burl, 'controller_name' => $controllerName, 'action_name' => $actionName, 'id_name' => $id_name, 't' => isset($params['t']) ? $params['t'] : "", 'v' => isset($params['v']) ? $params['v'] : ""));
                 } else {
                     array_push($recentlyViewed->recentlyViewedObject, array('url' => $burl, 'controller_name' => $controllerName, 'action_name' => $actionName, 'id_name' => $id_name));
                 }
             }
         }
     }
     echo '</ul></div>';
 }
Beispiel #2
0
 public function breadcrumbs($baseUrlString = '')
 {
     $request = Zend_Controller_Front::getInstance();
     $params = $request->getRequest()->getParams();
     $controllerName = $request->getRequest()->getControllerName();
     $action_Name = $request->getRequest()->getActionName();
     $tName = '';
     $vName = '';
     $tUrl = '';
     $serviceUrl = '';
     $burl = $controllerName . "/" . $action_Name;
     /**
      * 
      * For service request modifying the breadcrum based on t and v params
      * @var t and @var v
      */
     $param_t = isset($params['t']) ? sapp_Global::_decrypt($params['t']) : "";
     $param_v = isset($params['v']) ? sapp_Global::_decrypt($params['v']) : "";
     $service_menu = sapp_Helper::sd_menu_names();
     $service_action_arr = sapp_Helper::sd_action_names();
     if ($param_t != '' && isset($service_menu[$param_t])) {
         $tName = $service_menu[$param_t] . ' Summary';
         $tUrl = $baseUrlString . '/' . $controllerName . '/index/t/' . sapp_Global::_encrypt($param_t);
     }
     if ($param_v != '' && isset($service_action_arr[$param_v])) {
         $vName = $service_action_arr[$param_v];
     } else {
         $vName = $action_Name != 'index' ? $action_Name : '';
     }
     if ($vName != '') {
         if ($tName != '') {
             $serviceUrl = '<a href=' . $tUrl . '>' . $tName . '</a><span class="arrows">&rsaquo;</span>';
         }
         $serviceUrl .= '<span>' . ucfirst($vName) . '</span>';
     } else {
         $serviceUrl = '<span>' . $tName . '</span>';
     }
     /**
      * End modifying breadcrum for servicerequest.
      */
     unset($params['module'], $params['controller'], $params['action']);
     if (isset($params['error_handler'])) {
         unset($params['error_handler']);
     }
     $id_name = '';
     if (is_array($params) && !empty($params)) {
         foreach ($params as $key => $value) {
             if (!is_array($value)) {
                 $burl .= "/" . $key . "/" . $value;
             }
         }
         $id_name = "yes";
     }
     $pageUrl = explode("/", $_SERVER['REQUEST_URI']);
     $serverUrl = $_SERVER['HTTP_HOST'];
     $reportsArr = array('leavesreport' => 'Leaves', 'holidaygroupreports' => 'Holidays', 'activeuser' => 'Active Users', 'employeereport' => 'Employees', 'rolesgroup' => 'Roles', 'emprolesgroup' => 'Employee Roles', 'userlogreport' => 'User Logs', 'activitylogreport' => 'Activity Logs', 'requisitionstatusreport' => 'Requisition');
     $pageName = $controllerName;
     $actionName = $action_Name;
     $breadCrumbsData = '';
     $mydetails_arr = array('jobhistory' => 'Employee Job History', 'certification' => 'Training & Certification Details', 'experience' => 'Experience Details', 'education' => 'Education Details', 'medicalclaims' => 'Medical Claims', 'leaves' => 'Employee Leaves', 'skills' => 'Employee Skills', 'communication' => 'Contact Details', 'communicationdetailsview' => 'Contact Details', 'disability' => 'Disability Details', 'disabilitydetailsview' => 'Disability Details', 'workeligibility' => 'Work Eligibility Details', 'workeligibilitydetailsview' => 'Work Eligibility Details', 'visa' => 'Visa and Immigration Details', 'visadetailsview' => 'Visa and Immigration Details', 'additionaldetails' => 'Additional Details', 'additionaldetailsview' => 'Additional Details', 'salarydetails' => 'Salary Details', 'salarydetailsview' => 'Salary Details', 'personal' => 'Personal Details', 'personaldetailsview' => 'Personal Details', 'creditcard' => 'Corporate Card Details', 'creditcarddetailsview' => 'Corporate Card Details', 'dependency' => 'Dependency Details', 'edit' => 'Edit');
     $myemployees_arr = array('additionaldetailsview' => 'Additional Details', 'jobhistoryview' => 'Job History', 'perview' => 'Personal Details', 'expview' => 'Experience Details', 'eduview' => 'Education Details', 'skillsview' => 'Employee Skills', 'comview' => 'Contact Details', 'trainingview' => 'Training & Certification Details', 'view' => 'View');
     if ($pageName == '' || $pageName == 'welcome') {
         $breadCrumbsData .= '';
     } else {
         if ($pageName == 'dashboard') {
             $breadCrumbsData = '<div class="breadcrumbs">';
             if ($actionName == 'viewsettings') {
                 $breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">&rsaquo;</span> Settings';
             } else {
                 if ($actionName == 'viewprofile') {
                     $breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">&rsaquo;</span> Profile';
                 } else {
                     if ($actionName == 'changepassword') {
                         $breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">&rsaquo;</span> Change Password';
                     } else {
                         if ($actionName == 'emailsettings') {
                             $breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">&rsaquo;</span> Email Settings';
                         } else {
                             if ($actionName == 'upgradeapplication') {
                                 $breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">&rsaquo;</span> Upgrade Application  ';
                             }
                         }
                     }
                 }
             }
             $breadCrumbsData .= '</div>';
         } else {
             if ($pageName == 'configuresite') {
                 $breadCrumbsData = '<div class="breadcrumbs">';
                 $breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">&rsaquo;</span> Configure Site';
                 $breadCrumbsData .= '</div>';
             } else {
                 if ($pageName == 'managemenus') {
                     $breadCrumbsData = '<div class="breadcrumbs">';
                     $breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">&rsaquo;</span> Manage Modules';
                     $breadCrumbsData .= '</div>';
                 } else {
                     if ($pageName == 'logmanager') {
                         $breadCrumbsData = '<div class="breadcrumbs">';
                         $breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">&rsaquo;</span> Activity Log';
                         $breadCrumbsData .= '</div>';
                     } else {
                         if ($pageName == 'userloginlog') {
                             $breadCrumbsData = '<div class="breadcrumbs">';
                             $breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">&rsaquo;</span> User Log';
                             $breadCrumbsData .= '</div>';
                         } else {
                             if ($pageName == 'servicerequests') {
                                 $breadCrumbsData = '<div class="breadcrumbs">';
                                 $breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">&rsaquo;</span> Service Request Management<span class="arrows">&rsaquo;</span>' . $serviceUrl . '';
                                 $breadCrumbsData .= '</div>';
                             } else {
                                 if ($pageName == 'reports') {
                                     $breadCrumbsData = '<div class="breadcrumbs">';
                                     $breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">&rsaquo;</span>';
                                     if (isset($actionName) && $actionName != '') {
                                         $breadCrumbsData .= '<span><a href="' . $baseUrlString . '/reports">Analytics</a></span>';
                                         if ($actionName == 'userlogreport') {
                                             $breadCrumbsData .= '<span class="arrows">&rsaquo;</span>Audit Logs<span class="arrows">&rsaquo;</span><span>User log Report</span>';
                                         } else {
                                             if ($actionName == 'activitylogreport') {
                                                 $breadCrumbsData .= '<span class="arrows">&rsaquo;</span>Audit Logs<span class="arrows">&rsaquo;</span><span>Activity log Report</span>';
                                             } else {
                                                 if ($actionName == 'businessunits') {
                                                     $breadCrumbsData .= '<span class="arrows">&rsaquo;</span>Organization<span class="arrows">&rsaquo;</span><span>Business Units Report</span>';
                                                 } else {
                                                     if ($actionName == 'departments') {
                                                         $breadCrumbsData .= '<span class="arrows">&rsaquo;</span>Organization<span class="arrows">&rsaquo;</span><span>Departments Report</span>';
                                                     } else {
                                                         if ($actionName == 'leavesreport') {
                                                             $breadCrumbsData .= '<span class="arrows">&rsaquo;</span>Leave Management<span class="arrows">&rsaquo;</span><span>Employee Leaves Summary Report</span>';
                                                         } else {
                                                             if ($actionName == 'leavemanagementreport') {
                                                                 $breadCrumbsData .= '<span class="arrows">&rsaquo;</span>Leave Management<span class="arrows">&rsaquo;</span><span>Leave Management Summary Report</span>';
                                                             } else {
                                                                 if ($actionName == 'holidaygroupreports') {
                                                                     $breadCrumbsData .= '<span class="arrows">&rsaquo;</span>Holiday Management<span class="arrows">&rsaquo;</span><span>Holiday Groups & Holidays Report</span>';
                                                                 } else {
                                                                     if ($actionName == 'employeereport') {
                                                                         $breadCrumbsData .= '<span class="arrows">&rsaquo;</span><span>Employees Report</span> ';
                                                                     } else {
                                                                         if ($actionName == 'rolesgroup') {
                                                                             $breadCrumbsData .= '<span class="arrows">&rsaquo;</span>User Management<span class="arrows">&rsaquo;</span><span>Groups & Roles Report</span>';
                                                                         } else {
                                                                             if ($actionName == 'emprolesgroup') {
                                                                                 $breadCrumbsData .= '<span class="arrows">&rsaquo;</span>User Management<span class="arrows">&rsaquo;</span><span>Groups, Roles & Employees Report</span>';
                                                                             } else {
                                                                                 if ($actionName == 'activeuser') {
                                                                                     $breadCrumbsData .= '<span class="arrows">&rsaquo;</span>User Management<span class="arrows">&rsaquo;</span><span>Users & Employees Report</span>';
                                                                                 } else {
                                                                                     if ($actionName == 'requisitionstatusreport') {
                                                                                         $breadCrumbsData .= '<span class="arrows">&rsaquo;</span>Resource Requisition<span class="arrows">&rsaquo;</span><span>Requisitions Report</span>';
                                                                                     } else {
                                                                                         if ($actionName == 'candidatesreport') {
                                                                                             $breadCrumbsData .= '<span class="arrows">&rsaquo;</span>Resource Requisition<span class="arrows">&rsaquo;</span><span>Candidate Details Report</span>';
                                                                                         } else {
                                                                                             if ($actionName == 'interviewrounds') {
                                                                                                 $breadCrumbsData .= '<span class="arrows">&rsaquo;</span>Resource Requisition<span class="arrows">&rsaquo;</span><span>Scheduled Interviews Report</span>';
                                                                                             } else {
                                                                                                 if ($actionName == 'empscreening') {
                                                                                                     $breadCrumbsData .= '<span class="arrows">&rsaquo;</span>Background Checks<span class="arrows">&rsaquo;</span><span>Employee / Candidate Screening Report</span>';
                                                                                                 } else {
                                                                                                     if ($actionName == 'agencylistreport') {
                                                                                                         $breadCrumbsData .= '<span class="arrows">&rsaquo;</span>Background Checks<span class="arrows">&rsaquo;</span><span>Background Checks Agencies Report</span>';
                                                                                                     }
                                                                                                 }
                                                                                             }
                                                                                         }
                                                                                     }
                                                                                 }
                                                                             }
                                                                         }
                                                                     }
                                                                 }
                                                             }
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     } else {
                                         $breadCrumbsData .= '<span>Analytics</span>';
                                     }
                                     $breadCrumbsData .= '</div>';
                                 } else {
                                     $breadCrumbsData = '<div class="breadcrumbs">';
                                     $url = "/" . $pageName;
                                     $breadCrumIds = $this->getBreadCrumDetails($url);
                                     $breadCrumNames = array();
                                     if (!empty($breadCrumIds)) {
                                         $menu_model = new Default_Model_Menu();
                                         $breadcrumstring = trim($breadCrumIds[0]['nav_ids'], ',');
                                         $breadcrumArr = explode(",", $breadcrumstring);
                                         $breadCrumNames = $breadCrumIds;
                                         $breadCrumbsData .= '<span class="firstbreadcrumb" onclick="window.location=\'' . $baseUrlString . '\'">Home</span> <span class="arrows">&rsaquo;</span> ';
                                         for ($b = 0; $b < sizeof($breadCrumNames); $b++) {
                                             $breadCrumNames[$b]['menuName'] = $menu_model->getMenuText($breadCrumNames[$b]['menuName']);
                                             if ($b == 0) {
                                                 if ($breadCrumNames[$b]['url'] == '/sitepreference') {
                                                     $breadCrumbsData .= '<span>' . $breadCrumNames[$b]['menuName'] . '</span>';
                                                 } else {
                                                     $breadCrumbsData .= '<span>' . $breadCrumNames[$b]['menuName'] . '</span> <span class="arrows">&rsaquo;</span> ';
                                                 }
                                             } else {
                                                 if ($b == sizeof($breadCrumNames) - 1) {
                                                     if ($actionName == '') {
                                                         $breadCrumbsData .= '<span>' . $breadCrumNames[$b]['menuName'] . '</span>';
                                                     } else {
                                                         $breadCrumbsData .= '<a href="' . $baseUrlString . $breadCrumNames[$b]['url'] . '" >' . $breadCrumNames[$b]['menuName'] . '</a>';
                                                     }
                                                 } else {
                                                     $breadCrumbsData .= '<span>' . $breadCrumNames[$b]['menuName'] . '</span> <span class="arrows">&rsaquo;</span> ';
                                                 }
                                             }
                                         }
                                         if ($actionName == 'add' || $actionName == 'edit' && $id_name == '' || $actionName != '' && $actionName != 'view') {
                                             if ($actionName == 'edit' || $actionName != '') {
                                                 $idvalindex = '';
                                                 if (in_array('id', $pageUrl)) {
                                                     $idindex = array_search('id', $pageUrl);
                                                     $idvalindex = $idindex + 1;
                                                 } else {
                                                     if (in_array('userid', $pageUrl)) {
                                                         $idindex = array_search('userid', $pageUrl);
                                                         $idvalindex = $idindex + 1;
                                                     }
                                                 }
                                                 if ((in_array('id', $pageUrl) || in_array('userid', $pageUrl)) && $pageName != 'myemployees') {
                                                     $idval = intval($pageUrl[$idvalindex]);
                                                     if ($idval != 0) {
                                                         $breadCrumbsData .= '<span class="arrows">&rsaquo;</span> <span>Edit</span>';
                                                     } else {
                                                         $breadCrumbsData .= '<span class="arrows">&rsaquo;</span> <span>Add</span>';
                                                     }
                                                 } else {
                                                     if ($pageName == 'mydetails') {
                                                         if (isset($actionName) && $actionName != '') {
                                                             if (array_key_exists($actionName, $mydetails_arr) !== false) {
                                                                 $breadCrumbsData .= '<span class="arrows">&rsaquo;</span> <span>' . $mydetails_arr[$actionName] . '</span>';
                                                             }
                                                         } else {
                                                             $breadCrumbsData .= '<span class="arrows">&rsaquo;</span> <span>Edit</span>';
                                                         }
                                                     } else {
                                                         if ($pageName == 'myemployees') {
                                                             if (isset($actionName) && $actionName != '') {
                                                                 if (array_key_exists($actionName, $myemployees_arr) !== false) {
                                                                     $breadCrumbsData .= '<span class="arrows">&rsaquo;</span> <span>' . $myemployees_arr[$actionName] . '</span>';
                                                                 }
                                                             } else {
                                                                 $breadCrumbsData .= '<span class="arrows">&rsaquo;</span> <span>View</span>';
                                                             }
                                                         } else {
                                                             if ($actionName == 'multipleresume') {
                                                                 $breadCrumbsData .= '<span class="arrows">&rsaquo;</span> <span>Add multiple CVs</span>';
                                                             }
                                                             if ($actionName == 'edit' && $pageName == 'heirarchy') {
                                                                 $breadCrumbsData .= '<span class="arrows">&rsaquo;</span> <span>Edit</span>';
                                                             } else {
                                                                 if ($actionName == 'edit' || $actionName == 'add') {
                                                                     $breadCrumbsData .= '<span class="arrows">&rsaquo;</span> <span>Add</span>';
                                                                 } else {
                                                                     $breadCrumbsData .= '';
                                                                 }
                                                             }
                                                         }
                                                     }
                                                 }
                                             } else {
                                                 $breadCrumbsData .= '<span class="arrows">&rsaquo;</span> <span>Add</span>';
                                             }
                                         } else {
                                             if ($actionName == 'edit') {
                                                 $idvalindex = '';
                                                 if (in_array('id', $pageUrl)) {
                                                     $idindex = array_search('id', $pageUrl);
                                                     $idvalindex = $idindex + 1;
                                                 } else {
                                                     if (in_array('userid', $pageUrl)) {
                                                         $idindex = array_search('userid', $pageUrl);
                                                         $idvalindex = $idindex + 1;
                                                     }
                                                 }
                                                 if (in_array('id', $pageUrl) || in_array('userid', $pageUrl)) {
                                                     $idval = intval($pageUrl[$idvalindex]);
                                                     if ($idval != '') {
                                                         $breadCrumbsData .= '<span class="arrows">&rsaquo;</span> <span>Edit</span>';
                                                     } else {
                                                         $breadCrumbsData .= '<span class="arrows">&rsaquo;</span> <span>Add</span>';
                                                     }
                                                 } else {
                                                     $breadCrumbsData .= '<span class="arrows">&rsaquo;</span> <span>Add</span>';
                                                 }
                                             } else {
                                                 if ($actionName == 'view') {
                                                     $breadCrumbsData .= '<span class="arrows">&rsaquo;</span> <span>View</span>';
                                                 }
                                             }
                                         }
                                         $breadCrumbsData .= '</div>';
                                     } else {
                                         $breadCrumbsData = '';
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     echo $breadCrumbsData;
 }