コード例 #1
0
function subscribers_add_show($options)
{
    global $xoopsUser;
    include_once XOOPS_ROOT_PATH . '/modules/subscribers/include/functions.php';
    subscribers_sendEmails();
    $config =& subscribers_getModuleConfig();
    $block = array();
    include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
    $block['countries'] = XoopsLists::getCountryList();
    $block['selected'] = $config['country'];
    array_shift($block['countries']);
    $sub_captcha = $config['captcha'];
    if (is_object($xoopsUser)) {
        $block['captcha'] = $sub_captcha == 2 ? 0 : 1;
    } else {
        $block['captcha'] = $sub_captcha == 3 ? 0 : 1;
    }
    return $block;
}
コード例 #2
0
function waiting_index($start = 0)
{
    global $xoopsTpl, $xoopsUser, $xoopsConfig, $limit;
    include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
    include_once XOOPS_ROOT_PATH . '/modules/subscribers/include/functions.php';
    subscribers_sendEmails();
    $this_handler =& xoops_getModuleHandler('waiting', 'subscribers');
    $count = $this_handler->getCount();
    $xoopsTpl->assign('count', $count);
    $criteria = new CriteriaCompo();
    $criteria->setSort('wt_priority DESC, wt_created');
    $criteria->setOrder('ASC');
    $criteria->setStart($start);
    $criteria->setLimit($limit);
    $objs = $this_handler->getObjects($criteria);
    if ($count > 0) {
        if ($count > $limit) {
            include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
            $nav = new XoopsPageNav($count, $limit, $start, 'start', 'op=list');
            $xoopsTpl->assign('pag', '<div style="float:left; padding-top:2px;" align="center">' . $nav->renderNav() . '</div>');
        } else {
            $xoopsTpl->assign('pag', '');
        }
    } else {
        $xoopsTpl->assign('pag', '');
    }
    include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
    $countries = XoopsLists::getCountryList();
    foreach ($objs as $obj) {
        $objArray = $obj->toArray();
        $objArray['wt_created'] = formatTimestamp($objArray['wt_created']);
        $xoopsTpl->append('objs', $objArray);
        unset($objArray);
    }
    return $xoopsTpl->fetch(XOOPS_ROOT_PATH . '/modules/subscribers/templates/static/subscribers_admin_waiting.html');
}
コード例 #3
0
ファイル: index.php プロジェクト: trabisdementia/xuups
<?php

//  Author: Trabis
//  URL: http://www.xuups.com
//  E-Mail: lusopoemas@gmail.com
include_once dirname(dirname(dirname(__FILE__))) . '/mainfile.php';
include_once XOOPS_ROOT_PATH . '/modules/subscribers/include/functions.php';
subscribers_sendEmails();
$xoopsOption['template_main'] = 'subscribers_index.html';
include_once XOOPS_ROOT_PATH . '/header.php';
$config =& subscribers_getModuleConfig();
$selected = $config['country'];
$sub_captcha = $config['captcha'];
if (is_object($xoopsUser)) {
    $captcha = $sub_captcha == 2 ? 0 : 1;
} else {
    $captcha = $sub_captcha == 3 ? 0 : 1;
}
include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
$countries = XoopsLists::getCountryList();
array_shift($countries);
$xoopsTpl->assign('countries', $countries);
$xoopsTpl->assign('selected', $selected);
$xoopsTpl->assign('captcha', $captcha);
include_once XOOPS_ROOT_PATH . '/footer.php';