$_SESSION['notifytime'] = 0; } if (!isset($_SESSION['announcetime'])) { $_SESSION['announcetime'] = 0; } if (!isset($_SESSION['warntime'])) { $_SESSION['warntime'] = 0; } getTyping(); if ($notifications_on == 1 and !$popout) { getNotifications(); } if ($chatroom_check and !$popout) { getChatroom(); } if ($popout) { checkPopout(); } if (!$popout) { getAnnouncements(); } if ($enable_moderation == 1 and !$popout) { getWarnings(); } fetchMessages(); } header("Content-Type: application/x-javascript"); echo $_GET['callback'] . '(' . json_encode($response) . ');'; flush(); close_session(); exit;
function usermain_display() { global $xoopsOption, $xoopsTpl, $xoopsConfig, $xoopsUser, $xoopsLogger, $xoopsUserIsAdmin; global $xhelp_module_header; $xoopsOption['template_main'] = 'xhelp_user_index.html'; // Set template require XOOPS_ROOT_PATH . '/header.php'; // Include the page header $xhelpConfig = xhelpGetModuleConfig(); $hStaff =& xhelpGetHandler('staff'); $staffCount =& $hStaff->getObjects(); if (count($staffCount) == 0) { $xoopsTpl->assign('xhelp_noStaff', true); } /** * @todo remove calls to these three classes and use the ones in beginning */ $member_handler =& xoops_gethandler('member'); $hDepartments =& xhelpGetHandler('department'); $hTickets =& xhelpGetHandler('ticket'); $userTickets =& $hTickets->getMyUnresolvedTickets($xoopsUser->getVar('uid'), true); foreach ($userTickets as $ticket) { $aUserTickets[] = array('id' => $ticket->getVar('id'), 'uid' => $ticket->getVar('uid'), 'subject' => $ticket->getVar('subject'), 'status' => xhelpGetStatus($ticket->getVar('status')), 'priority' => $ticket->getVar('priority'), 'posted' => $ticket->posted()); } $has_userTickets = count($userTickets) > 0; if ($has_userTickets) { $xoopsTpl->assign('xhelp_userTickets', $aUserTickets); } else { $xoopsTpl->assign('xhelp_userTickets', 0); } $xoopsTpl->assign('xhelp_baseURL', XHELP_BASE_URL); $xoopsTpl->assign('xhelp_has_userTickets', $has_userTickets); $xoopsTpl->assign('xhelp_priorities', array(5, 4, 3, 2, 1)); $xoopsTpl->assign('xhelp_priorities_desc', array('5' => _XHELP_PRIORITY5, '4' => _XHELP_PRIORITY4, '3' => _XHELP_PRIORITY3, '2' => _XHELP_PRIORITY2, '1' => _XHELP_PRIORITY1)); $xoopsTpl->assign('xhelp_imagePath', XHELP_IMAGE_URL . '/'); $xoopsTpl->assign('xoops_module_header', $xhelp_module_header); getAnnouncements($xhelpConfig['xhelp_announcements']); require XOOPS_ROOT_PATH . '/footer.php'; //Include the page footer }