本文整理汇总了PHP中xoops_getModuleHandler函数的典型用法代码示例。如果您正苦于以下问题:PHP xoops_getModuleHandler函数的具体用法?PHP xoops_getModuleHandler怎么用?PHP xoops_getModuleHandler使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xoops_getModuleHandler函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: about_block_page_edit
/**
* @param $options
* @return string
*/
function about_block_page_edit($options)
{
xoops_loadLanguage('blocks', 'about');
$page_handler = xoops_getModuleHandler('page', 'about');
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('page_status', 1), 'AND');
$criteria->add(new Criteria('page_type', 1));
$criteria->setSort('page_order');
$criteria->setOrder('ASC');
$fields = array('page_id', 'page_title', 'page_image');
$pages = $page_handler->getAll($criteria, $fields, false);
$page_title = '';
foreach ($pages as $k => $v) {
$page_title = '<a href="' . XOOPS_URL . '/modules/' . basename(dirname(__DIR__)) . '/index.php?page_id=' . $k . '" target="_blank">' . $v['page_title'] . '</a>';
$options_page[$k] = empty($v['page_image']) ? $page_title : $page_title . '<img src="' . XOOPS_URL . '/modules/' . basename(dirname(__DIR__)) . '/assets/images/picture.png' . '" />';
}
include_once dirname(__DIR__) . '/include/xoopsformloader.php';
$form = new XoopsBlockForm();
$page_select = new XoopsFormRadio(_MB_ABOUT_BLOCKPAGE, 'options[0]', $options[0], '<br>');
$page_select->addOptionArray($options_page);
$form->addElement($page_select);
$form->addElement(new XoopsFormText(_MB_ABOUT_TEXT_LENGTH, 'options[1]', 5, 5, $options[1]));
$form->addElement(new XoopsFormText(_MB_ABOUT_VIEW_MORELINKTEXT, 'options[2]', 30, 50, $options[2]));
$form->addElement(new XoopsFormRadioYN(_MB_ABOUT_DOTITLEIMAGE, 'options[3]', $options[3]));
return $form->render();
}
示例2: getForm
/**
* @param bool $action
*
* @return XoopsThemeForm
*/
function getForm($action = false)
{
if ($action === false) {
$action = $_SERVER['REQUEST_URI'];
}
$title = $this->isNew() ? sprintf(_AM_SYSTEM_BANNERS_ADDNWBNR) : sprintf(_AM_SYSTEM_BANNERS_EDITBNR);
xoops_load('XoopsFormLoader');
$form = new XoopsThemeForm($title, 'form', $action, 'post', true);
$banner_client_Handler =& xoops_getModuleHandler('bannerclient', 'system');
$client_select = new XoopsFormSelect(_AM_SYSTEM_BANNERS_CLINAMET, 'cid', $this->getVar('cid'));
$client_select->addOptionArray($banner_client_Handler->getList());
$form->addElement($client_select, true);
$form->addElement(new XoopsFormText(_AM_SYSTEM_BANNERS_IMPPURCHT, 'imptotal', 20, 255, $this->getVar('imptotal')), true);
$form->addElement(new XoopsFormText(_AM_SYSTEM_BANNERS_IMGURLT, 'imageurl', 80, 255, $this->getVar('imageurl')), false);
$form->addElement(new XoopsFormText(_AM_SYSTEM_BANNERS_CLICKURLT, 'clickurl', 80, 255, $this->getVar('clickurl')), false);
$htmlbanner = $this->isNew() ? 0 : $this->getVar('htmlbanner');
$form->addElement(new XoopsFormRadioYN(_AM_SYSTEM_BANNERS_USEHTML, 'htmlbanner', $htmlbanner, _YES, _NO));
$form->addElement(new xoopsFormTextArea(_AM_SYSTEM_BANNERS_CODEHTML, 'htmlcode', $this->getVar('htmlcode'), 5, 50), false);
if (!$this->isNew()) {
$form->addElement(new XoopsFormHidden('bid', $this->getVar('bid')));
}
$form->addElement(new XoopsFormHidden('op', 'banner_save'));
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
//$form->display();
return $form;
}
示例3: smarty_function_xoInboxCount
function smarty_function_xoInboxCount($params, &$smarty)
{
global $xoopsUser;
if (!isset($xoopsUser) || !is_object($xoopsUser)) {
return;
}
$time = time();
if (isset($_SESSION['xoops_inbox_count']) && @$_SESSION['xoops_inbox_count_expire'] > $time) {
$count = intval($_SESSION['xoops_inbox_count']);
} else {
$module_handler = xoops_gethandler('module');
$pm_module = $module_handler->getByDirname('pm');
if ($pm_module && $pm_module->getVar('isactive')) {
$pm_handler =& xoops_getModuleHandler('message', 'pm');
} else {
$pm_handler =& xoops_gethandler('privmessage');
}
$criteria = new CriteriaCompo(new Criteria('read_msg', 0));
$criteria->add(new Criteria('to_userid', $xoopsUser->getVar('uid')));
$count = intval($pm_handler->getCount($criteria));
$_SESSION['xoops_inbox_count'] = $count;
$_SESSION['xoops_inbox_count_expire'] = $time + 60;
}
if (!@empty($params['assign'])) {
$smarty->assign($params['assign'], $count);
} else {
echo $count;
}
}
示例4: delete
/**
* Delete an object from the database
* @see XoopsPersistableObjectHandler
*
* @param XoopsObject $obj
* @param bool $force
*
* @return bool
*/
public function delete(XoopsObject $obj, $force = false)
{
if (parent::delete($obj, $force)) {
$field_handler = xoops_getModuleHandler('field');
return $field_handler->updateAll('step_id', 0, new Criteria('step_id', $obj->getVar('step_id')), $force);
}
return false;
}
示例5: profile_install_addField
function profile_install_addField($name, $title, $description, $category, $type, $valuetype, $weight, $canedit, $options, $step_id, $length, $visible = true)
{
global $module_id;
$profilefield_handler = xoops_getModuleHandler('field', 'profile');
$obj = $profilefield_handler->create();
$obj->setVar('field_name', $name, true);
$obj->setVar('field_moduleid', $module_id, true);
$obj->setVar('field_show', 1);
$obj->setVar('field_edit', $canedit ? 1 : 0);
$obj->setVar('field_config', 0);
$obj->setVar('field_title', strip_tags($title), true);
$obj->setVar('field_description', strip_tags($description), true);
$obj->setVar('field_type', $type, true);
$obj->setVar('field_valuetype', $valuetype, true);
$obj->setVar('field_options', $options, true);
if ($canedit) {
$obj->setVar('field_maxlength', $length, true);
}
$obj->setVar('field_weight', $weight, true);
$obj->setVar('cat_id', $category, true);
$obj->setVar('step_id', $step_id, true);
$profilefield_handler->insert($obj);
profile_install_setPermissions($obj->getVar('field_id'), $module_id, $canedit, $visible);
return true;
/*
//$GLOBALS['xoopsDB']->query("INSERT INTO ".$GLOBALS['xoopsDB']->prefix("profile_field")." VALUES (0, {$category}, '{$type}', {$valuetype}, '{$name}', " . $GLOBALS['xoopsDB']->quote($title) . ", " . $GLOBALS['xoopsDB']->quote($description) . ", 0, {$length}, {$weight}, '', 1, {$canedit}, 1, 0, '" . serialize($options) . "', {$step_id})");
$gperm_itemid = $obj->getVar('field_id');
unset($obj);
$gperm_modid = $module_id;
$sql = "INSERT INTO " . $GLOBALS['xoopsDB']->prefix("group_permission") .
" (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) " .
" VALUES " .
($canedit ?
" (" . XOOPS_GROUP_ADMIN . ", {$gperm_itemid}, {$gperm_modid}, 'profile_edit'), "
: "" ) .
($canedit == 1 ?
" (" . XOOPS_GROUP_USERS . ", {$gperm_itemid}, {$gperm_modid}, 'profile_edit'), "
: "" ) .
" (" . XOOPS_GROUP_ADMIN . ", {$gperm_itemid}, {$gperm_modid}, 'profile_search'), " .
" (" . XOOPS_GROUP_USERS . ", {$gperm_itemid}, {$gperm_modid}, 'profile_search') " .
" ";
$GLOBALS['xoopsDB']->query($sql);
if ( $visible ) {
$sql = "INSERT INTO " . $GLOBALS['xoopsDB']->prefix("profile_visibility") .
" (field_id, user_group, profile_group) " .
" VALUES " .
" ({$gperm_itemid}, " . XOOPS_GROUP_ADMIN . ", " . XOOPS_GROUP_ADMIN . "), " .
" ({$gperm_itemid}, " . XOOPS_GROUP_ADMIN . ", " . XOOPS_GROUP_USERS . "), " .
" ({$gperm_itemid}, " . XOOPS_GROUP_USERS . ", " . XOOPS_GROUP_ADMIN . "), " .
" ({$gperm_itemid}, " . XOOPS_GROUP_USERS . ", " . XOOPS_GROUP_USERS . "), " .
" ({$gperm_itemid}, " . XOOPS_GROUP_ANONYMOUS . ", " . XOOPS_GROUP_ADMIN . "), " .
" ({$gperm_itemid}, " . XOOPS_GROUP_ANONYMOUS . ", " . XOOPS_GROUP_USERS . ")" .
" ";
$GLOBALS['xoopsDB']->query($sql);
}
*/
}
示例6: b_mypics_lastpictures_show
function b_mypics_lastpictures_show($options)
{
$criteria = new Criteria('id', 0, '>');
$criteria->setSort('id');
$criteria->setOrder('DESC');
$criteria->setLimit($options[0]);
$handler = xoops_getModuleHandler('image', 'mypics');
$block = $handler->getLastPicturesForBlock($options[0]);
return $block;
}
示例7: _getModuleMenus
function _getModuleMenus($module, $pid)
{
global $xoopsDB, $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig;
static $id = -1;
$ret = array();
//Sanitizing $module
if (preg_match('/[^a-z0-9\\/\\\\_.:-]/i', $module)) {
return $ret;
}
$path = "modules/{$module}";
$file = $GLOBALS['xoops']->path("{$path}/xoops_version.php");
if (!file_exists($file)) {
return $ret;
}
xoops_loadLanguage('modinfo', $module);
$force = true;
$overwrite = false;
if ($force && (!is_object($xoopsModule) || $xoopsModule->getVar('dirname') != $module)) {
$_xoopsModule = is_object($xoopsModule) ? $xoopsModule : $xoopsModule;
$_xoopsModuleConfig = is_object($xoopsModuleConfig) ? $xoopsModuleConfig : $xoopsModuleConfig;
$module_handler =& xoops_gethandler('module');
$xoopsModule =& $module_handler->getByDirname($module);
$GLOBALS['xoopsModule'] =& $xoopsModule;
if (is_object($xoopsModule)) {
$config_handler =& xoops_gethandler('config');
$xoopsModuleConfig =& $config_handler->getConfigsByCat(0, $xoopsModule->getVar('mid'));
$GLOBALS['xoopsModuleConfig'] =& $xoopsModuleConfig;
}
$overwrite = true;
}
$modversion['sub'] = array();
include $file;
$handler = xoops_getModuleHandler('menu', 'mymenus');
foreach ($modversion['sub'] as $menu) {
$obj = $handler->create();
$obj->setVar('title', $menu['name']);
$obj->setVar('alt_title', $menu['name']);
$obj->setVar('link', $GLOBALS['xoops']->url("{$path}/{$menu['url']}"));
$obj->setVar('id', $id);
$obj->setVar('pid', $pid);
$ret[] = $obj->getValues();
$id--;
}
if ($overwrite) {
$xoopsModule =& $_xoopsModule;
$GLOBALS['xoopsModule'] =& $xoopsModule;
$xoopsModuleConfig =& $_xoopsModuleConfig;
$GLOBALS['xoopsModuleConfig'] =& $xoopsModuleConfig;
}
return $ret;
}
示例8: getForm
/**
* @param bool $action
* @return XoopsThemeForm
*/
public function getForm($action = false)
{
global $xoopsDB, $xoopsModuleConfig;
if ($action === false) {
$action = $_SERVER['REQUEST_URI'];
}
$title = $this->isNew() ? sprintf(_AM_PRESENTER_CAT_ADD) : sprintf(_AM_PRESENTER_CAT_EDIT);
include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
$form = new XoopsThemeForm($title, 'form', $action, 'post', true);
$form->setExtra('enctype="multipart/form-data"');
// Cat_pid
include_once XOOPS_ROOT_PATH . '/class/tree.php';
$categoriesHandler =& xoops_getModuleHandler('categories', 'presenter');
$criteria = new CriteriaCompo();
$categories = $categoriesHandler->getObjects($criteria);
if ($categories) {
$categories_tree = new XoopsObjectTree($categories, 'cat_id', 'cat_pid');
$cat_pid = $categories_tree->makeSelBox('cat_pid', 'cat_title', '--', $this->getVar('cat_pid', 'e'), false);
$form->addElement(new XoopsFormLabel(_AM_PRESENTER_CAT_PID, $cat_pid));
}
// Cat_title
$form->addElement(new XoopsFormText(_AM_PRESENTER_CAT_TITLE, 'cat_title', 50, 255, $this->getVar('cat_title')), true);
// Cat_desc
$form->addElement(new XoopsFormTextArea(_AM_PRESENTER_CAT_DESC, 'cat_desc', $this->getVar('cat_desc'), 4, 47), true);
// Cat_image
$cat_image = $this->getVar('cat_image') ? $this->getVar('cat_image') : 'blank.gif';
$uploadir = '/uploads/presenter/images/categories';
$imgtray = new XoopsFormElementTray(_AM_PRESENTER_CAT_IMAGE, '<br />');
$imgpath = sprintf(_AM_PRESENTER_FORMIMAGE_PATH, $uploadir);
$imageselect = new XoopsFormSelect($imgpath, 'cat_image', $cat_image);
$image_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . $uploadir);
foreach ($image_array as $image) {
$imageselect->addOption("{$image}", $image);
}
$imageselect->setExtra("onchange='showImgSelected(\"image_cat_image\", \"cat_image\", \"" . $uploadir . "\", \"\", \"" . XOOPS_URL . "\")'");
$imgtray->addElement($imageselect);
$imgtray->addElement(new XoopsFormLabel('', "<br /><img src='" . XOOPS_URL . "/" . $uploadir . "/" . $cat_image . "' name='image_cat_image' id='image_cat_image' alt='' />"));
$fileseltray = new XoopsFormElementTray('', '<br />');
$fileseltray->addElement(new XoopsFormFile(_AM_PRESENTER_FORMUPLOAD, 'cat_image', $xoopsModuleConfig['maxsize']));
$fileseltray->addElement(new XoopsFormLabel(''));
$imgtray->addElement($fileseltray);
$form->addElement($imgtray);
// Cat_weight
$form->addElement(new XoopsFormText(_AM_PRESENTER_CAT_WEIGHT, 'cat_weight', 50, 255, $this->getVar('cat_weight')), false);
// Cat_color
// $form->addElement(new XoopsFormColorPicker(_AM_PRESENTER_CAT_COLOR, 'cat_color', $this->getVar('cat_color')), false);
$form->addElement(new XoopsFormHidden('op', 'save'));
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
return $form;
}
示例9: subscribers_sendEmails
function subscribers_sendEmails()
{
global $xoopsConfig;
$thisConfigs =& subscribers_getModuleConfig();
$emailsperpack = intval($thisConfigs['emailsperpack']);
$timebpacks = intval($thisConfigs['timebpacks']);
$fromname = trim($thisConfigs['fromname']);
$fromemail = trim($thisConfigs['fromemail']);
$fromname = $fromname != '' ? $fromname : $xoopsConfig['sitename'];
$fromemail = $fromemail != '' ? $fromemail : $xoopsConfig['adminmail'];
$now = time();
$last = subscribers_getLastTime();
if ($now - $last <= $timebpacks) {
return false;
}
$this_handler =& xoops_getModuleHandler('waiting', 'subscribers');
$criteria = new CriteriaCompo();
$criteria->setSort('wt_priority DESC, wt_created');
$criteria->setOrder('ASC');
$criteria->setLimit($emailsperpack);
$objs = $this_handler->getObjects($criteria);
$count = count($objs);
unset($criteria);
if ($count == 0) {
return false;
}
include_once XOOPS_ROOT_PATH . '/kernel/user.php';
$obj_delete = array();
foreach ($objs as $obj) {
$xoopsMailer =& xoops_getMailer();
$xoopsMailer->multimailer->ContentType = "text/html";
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/subscribers/language/' . $xoopsConfig['language'] . '/mail_template/');
$xoopsMailer->setTemplate('content.tpl');
$xoopsMailer->setFromName($fromname);
$xoopsMailer->setFromEmail($fromemail);
$xoopsMailer->useMail();
$xoopsMailer->setToEmails(array($obj->getVar('wt_toemail', 'n')));
$xoopsMailer->setSubject($obj->getVar('wt_subject'), 'n');
$xoopsMailer->assign('CONTENT', $obj->getVar('wt_body'));
$key = md5($obj->getVar('wt_toemail', 'n') . XOOPS_ROOT_PATH);
$xoopsMailer->assign("UNSUBSCRIBE_URL", XOOPS_URL . '/modules/subscribers/unsubscribe.php?email=' . $obj->getVar('wt_toemail', 'n') . '&key=' . $key);
$xoopsMailer->send(false);
unset($xoopsMailer);
$obj_delete[] = $obj->getVar('wt_id');
}
$criteria = new Criteria('wt_id', '(' . implode(',', $obj_delete) . ')', 'IN');
$this_handler->deleteAll($criteria, true);
subscribers_setLastTime($now);
return true;
}
示例10: langDropdown
function langDropdown()
{
$content = '';
$time = time();
if (!isset($_SESSION['XoopsMLcontent']) && @$_SESSION['XoopsMLcontent_expire'] < $time) {
include_once XOOPS_ROOT_PATH . '/kernel/module.php';
$xlanguage = XoopsModule::getByDirname('xlanguage');
if (is_object($xlanguage) && $xlanguage->getVar('isactive')) {
include_once XOOPS_ROOT_PATH . '/modules/xlanguage/include/vars.php';
include_once XOOPS_ROOT_PATH . '/modules/xlanguage/include/functions.php';
$xlanguage_handler = xoops_getModuleHandler('language', 'xlanguage');
$xlanguage_handler->loadConfig();
$lang_list =& $xlanguage_handler->getAllList();
$content .= '<select name="mlanguages" id="mlanguages">';
$content .= '<option value="">{#xoopsmlcontent_dlg.sellang}</option>';
if (is_array($lang_list) && count($lang_list) > 0) {
foreach (array_keys($lang_list) as $lang_name) {
$lang =& $lang_list[$lang_name];
$content .= '<option value="' . $lang['base']->getVar('lang_code') . '">' . $lang['base']->getVar('lang_name') . '</option>';
}
}
$content .= '</select>';
} elseif (defined('EASIESTML_LANGS') && defined('EASIESTML_LANGNAMES')) {
$easiestml_langs = explode(',', EASIESTML_LANGS);
$langnames = explode(',', EASIESTML_LANGNAMES);
$lang_options = '';
$content .= '<select name="mlanguages" id="mlanguages">';
$content .= '<option value="">{#xoopsmlcontent_dlg.sellang}</option>';
foreach ($easiestml_langs as $l => $lang) {
$content .= '<option value="' . $lang . '">' . $langnames[$l] . '</option>';
}
$content .= '</select>';
} else {
$content .= '<input type="text" name="mlanguages" />';
}
$_SESSION['XoopsMLcontent'] = $content;
$_SESSION['XoopsMLcontent_expire'] = $time + 300;
}
echo $_SESSION['XoopsMLcontent'];
}
示例11: publisher_tag_iteminfo
/** Get item fields: title, content, time, link, uid, uname, tags *
*
* @param $items
*/
function publisher_tag_iteminfo(&$items)
{
$itemsId = array();
foreach (array_keys($items) as $catId) {
// Some handling here to build the link upon catid
// if catid is not used, just skip it
foreach (array_keys($items[$catId]) as $itemId) {
// In article, the item_id is "art_id"
$itemsId[] = (int) $itemId;
}
}
$itemHandler =& xoops_getModuleHandler('item', 'publisher');
$criteria = new Criteria('itemid', '(' . implode(', ', $itemsId) . ')', 'IN');
$itemsObj = $itemHandler->getObjects($criteria, 'itemid');
foreach (array_keys($items) as $catId) {
foreach (array_keys($items[$catId]) as $itemId) {
$itemObj = $itemsObj[$itemId];
$items[$catId][$itemId] = array('title' => $itemObj->getVar('title'), 'uid' => $itemObj->getVar('uid'), 'link' => "item.php?itemid={$itemId}", 'time' => $itemObj->getVar('datesub'), 'tags' => tag_parse_tag($itemObj->getVar('item_tag', 'n')), 'content' => '');
}
}
unset($itemsObj);
}
示例12: presenter_CleanVars
*
* @copyright XOOPS Project (http://xoops.org)
* @license GPL 2.0 or later
* @package presenter
* @since 2.5.5
* @author XOOPS Development Team <name@site.com> - <http://xoops.org>
* @version $Id: 1.0 categories.php 11532 Wed 2013/08/28 4:00:27Z XOOPS Development Team $
*/
include_once __DIR__ . '/header.php';
$xoopsOption['template_main'] = 'presenter_categories.tpl';
include_once XOOPS_ROOT_PATH . '/header.php';
$start = presenter_CleanVars($_REQUEST, 'start', 0);
// Define Stylesheet
$xoTheme->addStylesheet($style);
// Get Handler
$categoriesHandler =& xoops_getModuleHandler('categories', 'presenter');
$nb_categories = $GLOBALS['xoopsModuleConfig']['userpager'];
$criteria = new CriteriaCompo();
$categories_count = $categoriesHandler->getCount($criteria);
$categories_arr = $categoriesHandler->getAll($criteria);
if ($categories_count > 0) {
foreach (array_keys($categories_arr) as $i) {
$cat['cat_id'] = $categories_arr[$i]->getVar('cat_id');
$cat['cat_pid'] = $categories_arr[$i]->getVar('cat_pid');
$cat['cat_title'] = $categories_arr[$i]->getVar('cat_title');
$cat['cat_desc'] = strip_tags($categories_arr[$i]->getVar('cat_desc'));
$cat['cat_image'] = $categories_arr[$i]->getVar('cat_image');
$cat['cat_weight'] = $categories_arr[$i]->getVar('cat_weight');
$cat['cat_color'] = $categories_arr[$i]->getVar('cat_color');
$GLOBALS['xoopsTpl']->append('categories', $cat);
$keywords[] = $categories_arr[$i]->getVar('cat_name');
示例13: profile_stepsave_toggle
/**
* @param $step_d
* @param $step_save
*/
function profile_stepsave_toggle($step_d, $step_save)
{
$step_save = $step_save == 1 ? 0 : 1;
$handler = xoops_getModuleHandler('regstep');
$obj = $handler->get($_REQUEST['step_id']);
$obj->setVar('step_save', $step_save);
if ($handler->insert($obj, true)) {
redirect_header('step.php', 1, _PROFILE_AM_SAVESTEP_TOGGLE_SUCCESS);
} else {
redirect_header('step.php', 1, _PROFILE_AM_SAVESTEP_TOGGLE_FAILED);
}
}
示例14: initHandler
/**
* @static function initHandler
* @param string $name
*/
public function initHandler($name)
{
$this->addLog('INIT ' . $name . ' HANDLER');
$this->handler[$name . '_handler'] = xoops_getModuleHandler($name, $this->dirname);
}
示例15: xoops_loadLanguage
* @since 1.0
* @author trabis <lusopoemas@gmail.com>
* @author Taiwen Jiang <phppp@users.sourceforge.net>
* @version $Id: search.php 10374 2012-12-12 23:39:48Z trabis $
*/
include_once __DIR__ . '/header.php';
xoops_loadLanguage('search');
//Checking general permissions
$configHandler =& xoops_getHandler('config');
$xoopsConfigSearch = $configHandler->getConfigsByCat(XOOPS_CONF_SEARCH);
if (empty($xoopsConfigSearch['enable_search'])) {
redirect_header(PUBLISHER_URL . '/index.php', 2, _NOPERM);
// exit();
}
$groups = $GLOBALS['xoopsUser'] ? $GLOBALS['xoopsUser']->getGroups() : XOOPS_GROUP_ANONYMOUS;
$gpermHandler =& xoops_getModuleHandler('groupperm', PUBLISHER_DIRNAME);
$module_id = $publisher->getModule()->mid();
//Checking permissions
if (!$publisher->getConfig('perm_search') || !$gpermHandler->checkRight('global', PublisherConstants::PUBLISHER_SEARCH, $groups, $module_id)) {
redirect_header(PUBLISHER_URL, 2, _NOPERM);
// exit();
}
$GLOBALS['xoopsConfig']['module_cache'][$module_id] = 0;
$xoopsOption['template_main'] = 'publisher_search.tpl';
include $GLOBALS['xoops']->path('header.php');
$module_info_search = $publisher->getModule()->getInfo('search');
include_once PUBLISHER_ROOT_PATH . '/' . $module_info_search['file'];
$limit = 10;
//$publisher->getConfig('idxcat_perpage');
$uid = 0;
$queries = array();