<?php //$Id: xhelp_blocks.php,v 1.65 2005/11/30 19:25:00 eric_juden Exp $ if (!defined('XOOPS_ROOT_PATH')) { exit; } if (!defined('XHELP_CONSTANTS_INCLUDED')) { include_once XOOPS_ROOT_PATH . '/modules/xhelp/include/constants.php'; } include_once XHELP_BASE_PATH . '/functions.php'; include_once XHELP_CLASS_PATH . '/session.php'; xhelpIncludeLang('main'); function b_xhelp_open_show($options) { global $xoopsUser; $max_char_in_title = $options[0]; if ($xoopsUser) { $uid = $xoopsUser->getVar('uid'); // Get uid $block = array(); $hTickets =& xhelpGetHandler('ticket'); // Get ticket handler $hStaff =& xhelpGetHandler('staff'); if ($isStaff =& $hStaff->isStaff($xoopsUser->getVar('uid'))) { $crit = new CriteriaCompo(new Criteria('ownership', $uid)); $crit->add(new Criteria('status', 2, '<')); $crit->setOrder('DESC'); $crit->setSort('priority, posted'); $crit->setLimit(5); $tickets =& $hTickets->getObjects($crit); foreach ($tickets as $ticket) {
/** Get the list of token to ignore. @return array ignore list */ function getIgnoreList() { global $xhelp_noise_words; @xhelpIncludeLang('noise_words'); return $xhelp_noise_words; }
<?php //$Id: ticketValues.php,v 1.11 2005/12/21 14:37:33 ackbarr Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // // <http://www.xoops.org/> // // ------------------------------------------------------------------------ // if (!defined('XHELP_CONSTANTS_INCLUDED')) { exit; } require_once XHELP_CLASS_PATH . '/xhelpBaseObjectHandler.php'; xhelpIncludeLang('admin'); /** * xhelpTicketValues class * * Metadata that represents a custom value created for xhelp * * @author Eric Juden <*****@*****.**> * @access public * @package xhelp */ class xhelpTicketValues extends XoopsObject { var $_fields = array(); /** * Class Constructor * * @param mixed $ticketid null for a new object, hash table for an existing object * @return none * @access public
<?php if (!defined('XHELP_CONSTANTS_INCLUDED')) { include_once XOOPS_ROOT_PATH . '/modules/xhelp/include/constants.php'; } require XHELP_BASE_PATH . '/admin/admin_buttons.php'; require_once XHELP_BASE_PATH . '/functions.php'; require_once XHELP_INCLUDE_PATH . '/functions_admin.php'; require_once XHELP_INCLUDE_PATH . '/events.php'; require_once XHELP_CLASS_PATH . '/session.php'; include_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; include_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; xhelpIncludeLang('main'); xhelpIncludeLang('modinfo'); global $xoopsModule; $module_id = $xoopsModule->getVar('mid'); $oAdminButton = new AdminButtons(); $oAdminButton->AddTitle(sprintf(_AM_XHELP_ADMIN_TITLE, $xoopsModule->getVar('name'))); $oAdminButton->AddButton(_AM_XHELP_INDEX, XHELP_ADMIN_URL . "/index.php", 'index'); $oAdminButton->AddButton(_AM_XHELP_MENU_MANAGE_DEPARTMENTS, XHELP_ADMIN_URL . "/department.php?op=manageDepartments", 'manDept'); $oAdminButton->AddButton(_AM_XHELP_TEXT_MANAGE_FILES, XHELP_ADMIN_URL . "/file.php?op=manageFiles", 'manFiles'); $oAdminButton->AddButton(_AM_XHELP_MENU_MANAGE_STAFF, XHELP_ADMIN_URL . "/staff.php?op=manageStaff", 'manStaff'); $oAdminButton->AddButton(_AM_XHELP_TEXT_MANAGE_NOTIFICATIONS, XHELP_ADMIN_URL . "/notifications.php", 'manNotify'); $oAdminButton->AddButton(_AM_XHELP_TEXT_MANAGE_STATUSES, XHELP_ADMIN_URL . "/status.php?op=manageStatus", 'manStatus'); $oAdminButton->addButton(_AM_XHELP_TEXT_MANAGE_FIELDS, XHELP_ADMIN_URL . '/fields.php', 'manfields'); $oAdminButton->AddButton(_AM_XHELP_MENU_MANAGE_FAQ, "faqAdapter.php?op=manage", 'manFaqAdapters'); $oAdminButton->addButton(_AM_XHELP_MENU_MIMETYPES, XHELP_ADMIN_URL . "/mimetypes.php", 'mimetypes'); $oAdminButton->addButton(_AM_XHELP_TEXT_MAIL_EVENTS, XHELP_ADMIN_URL . "/index.php?op=mailEvents", 'mailEvents'); $oAdminButton->AddTopLink(_AM_XHELP_MENU_PREFERENCES, XOOPS_URL . "/modules/system/admin.php?fct=preferences&op=showmod&mod=" . $module_id); //$oAdminButton->AddTopLink(_AM_XHELP_BLOCK_TEXT, XHELP_ADMIN_URL."/index.php?op=blocks");
/** * Create ticket statuses for a new installation * * @return TRUE if success, FALSE if failure * @access public */ function xhelpCreateStatuses() { if (!defined('_XHELP_STATUS0')) { xhelpIncludeLang('main', 'english'); } $statuses = array(1 => array('description' => _XHELP_STATUS0, 'state' => XHELP_STATE_UNRESOLVED), 2 => array('description' => _XHELP_STATUS1, 'state' => XHELP_STATE_UNRESOLVED), 3 => array('description' => _XHELP_STATUS2, 'state' => XHELP_STATE_RESOLVED)); $hStatus =& xhelpGetHandler('status'); foreach ($statuses as $id => $status) { $newStatus =& $hStatus->create(); $newStatus->setVar('id', $id); $newStatus->setVar('description', $status['description']); $newStatus->setVar('state', $status['state']); if (!$hStatus->insert($newStatus)) { return false; } } return true; }