$menu_criteria->setOrder('ASC'); $case_menu = $case_handler->getAll($menu_criteria, null, false); } $criteria = new CriteriaCompo(); if (!empty($case_id)) { $criteria->add(new Criteria('case_id', $case_id)); } else { if (!empty($case_menu)) { $current_case = current($case_menu); $criteria->add(new Criteria('case_id', $current_case['case_id'])); } } $criteria->add(new Criteria('case_status', 1)); $case = current($case_handler->getAll($criteria, null, false, false)); $xoopsOption['xoops_pagetitle'] = $case['case_menu_title'] . ' - ' . $service_obj->getVar('service_menu_name') . ' - ' . $xoopsModule->getVar('name'); $xoopsOption['template_main'] = portfolio_getTemplate("case", $case['case_tpl']); include XOOPS_ROOT_PATH . '/header.php'; $xoopsTpl->assign('cs', $cs); if (!empty($case)) { //Case $case['service_id'] = $service_id; $myts = MyTextSanitizer::getInstance(); $case['case_summary'] = $myts->undoHtmlSpecialChars($case['case_summary']); $case['case_description'] = $myts->undoHtmlSpecialChars($case['case_description']); // Case Servers $cs = $cs_handler->getServerIds(array($case['case_id'])); if (!empty($cs)) { foreach ($cs as $k => $v) { $service_ids[] = $v['service_id']; } $criteria = new CriteriaCompo();
// Server Menu $menu_criteria = new CriteriaCompo(); $menu_criteria->add(new Criteria('service_status', 1), 'AND'); $menu_criteria->setSort('service_weight'); $menu_criteria->setOrder('ASC'); $service_menu = $service_handler->getAll($menu_criteria, null, false); $criteria = new CriteriaCompo(); if (!empty($service_id)) { $criteria->add(new Criteria('service_id', $service_id)); } else { if (!empty($service_menu)) { $current_service = current($service_menu); $criteria->add(new Criteria('service_id', $current_service['service_id'])); } } $criteria->add(new Criteria('service_status', 1)); $service = current($service_handler->getAll($criteria, null, false, false)); $xoopsOption['xoops_pagetitle'] = $service['service_menu_name'] . ' - ' . $xoopsModule->getVar('name'); $xoopsOption['template_main'] = portfolio_getTemplate("service", $service['service_tpl']); include XOOPS_ROOT_PATH . '/header.php'; if (!empty($service)) { $myts = MyTextSanitizer::getInstance(); $service['service_desc'] = $myts->undoHtmlSpecialChars($service['service_desc']); $xoTheme->addMeta('meta', 'description', $service['service_menu_name']); $xoopsTpl->assign('service_menu', $service_menu); $xoopsTpl->assign('service', $service); if ($service_id) { $xoBreadcrumbs[] = array('title' => $service['service_menu_name']); } } include_once 'footer.php';