本文整理汇总了PHP中XoopsUser类的典型用法代码示例。如果您正苦于以下问题:PHP XoopsUser类的具体用法?PHP XoopsUser怎么用?PHP XoopsUser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了XoopsUser类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: xoonips_change_uid
function xoonips_change_uid($su_uid)
{
$u = new XoopsUser($su_uid);
$groupids = $u->getGroups();
$_SESSION['xoopsUserId'] = $su_uid;
$_SESSION["xoopsUserGroups"] = $groupids;
}
开发者ID:XoopsModules25x,项目名称:xcl-module-xoonips,代码行数:7,代码来源:su.php
示例2: mail_approved
/**
* @desc Envía correo de aprobación de publicación
* @param Object $res Publicación
**/
function mail_approved(RDResource &$res)
{
global $xoopsModuleConfig, $xoopsConfig;
$config_handler =& xoops_gethandler('config');
$mconfig = $config_handler->getConfigsByCat(XOOPS_CONF_MAILER);
$errors = '';
$user = new XoopsUser($res->getVar('owner'));
$member_handler =& xoops_gethandler('member');
$method = $user->getVar('notify_method');
$mailer = new RMMailer('text/plain');
$mailer->add_xoops_users($user);
$mailer->set_subject(sprintf(__('Publication <%s> approved!', 'docs'), $res->getVar('title')));
$mailer->assign('dear_user', $user->getVar('name') != '' ? $user->getVar('name') : $user->getVar('uname'));
$mailer->assign('link_to_resource', $res->permalink());
$mailer->assign('site_name', $xoopsConfig['sitename']);
$mailer->assign('resource_name', $res->getVar('title'));
$mailer->template(RMTemplate::get()->get_template('mail/resource_approved.php', 'module', 'docs'));
switch ($method) {
case '1':
$mailer->set_from_xuser($mconfig['fromuid']);
$ret = $mailer->send_pm();
break;
case '2':
$ret = $mailer->send();
break;
}
$page = rmc_server_var($_POST, 'page', 1);
return $ret;
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:33,代码来源:rdfunctions.php
示例3: cm_show_messages
/**
* Shows all messages sent by users and stored in database
*/
function cm_show_messages()
{
global $xoopsDB, $xoopsModuleConfig, $xoopsSecurity;
// Styles
RMTemplate::get()->add_style('admin.css', 'contact');
// Pagination
$page = rmc_server_var($_GET, 'page', 1);
$page = $page <= 0 ? 1 : $page;
$result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("contactme"));
list($num) = $xoopsDB->fetchRow($result);
$limit = $xoopsModuleConfig['limit'];
$tpages = ceil($num / $limit);
$page = $page > $tpages ? $tpages : $page;
$start = $num <= 0 ? 0 : ($page - 1) * $limit;
$nav = new RMPageNav($num, $limit, $page, 5);
$nav->target_url('index.php?page={PAGE_NUM}');
// Get messages
$messages = array();
$result = $xoopsDB->query("SELECT * FROM " . $xoopsDB->prefix("contactme") . " ORDER BY id_msg DESC LIMIT {$start},{$limit}");
$time = new RMTimeFormatter(0, __('%M% %d%, %Y%', 'contact'));
while ($row = $xoopsDB->fetchArray($result)) {
$msg = new CTMessage();
$msg->assignVars($row);
if ($msg->getVar('xuid')) {
$user = new XoopsUser($msg->getVar('xuid'));
}
$messages[] = array('id' => $msg->id(), 'subject' => $msg->getVar('subject'), 'ip' => $msg->getVar('ip'), 'email' => $msg->getVar('email'), 'name' => $msg->getVar('name'), 'company' => $msg->getVar('org'), 'body' => $msg->getVar('body'), 'phone' => $msg->getVar('phone'), 'register' => $msg->getVar('register'), 'xuid' => $msg->getVar('xuid'), 'uname' => $msg->getVar('xuid') > 0 ? $user->uname() : '', 'date' => $time->format($msg->getVar('date')));
}
RMTemplate::get()->add_local_script('admin.js', 'contact');
RMTemplate::get()->add_local_script('jquery.checkboxes.js', 'rmcommon');
xoops_cp_header();
include RMTemplate::get()->get_template('admin/ct_dashboard.php', 'module', 'contact');
xoops_cp_footer();
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:37,代码来源:index.php
示例4: eventCoreIncludeCommonLanguage
/**
* To prevent errors when upload images with closed site
*/
public function eventCoreIncludeCommonLanguage()
{
global $xoopsConfig;
if ($xoopsConfig['cpanel'] != 'redmexico') {
$db = XoopsDatabaseFactory::getDatabaseConnection();
$db->queryF("UPDATE " . $db->prefix("config") . " SET conf_value='redmexico' WHERE conf_modid=0 AND conf_catid=1 AND conf_name='cpanel'");
}
/**
* Check before to a rmcommon native module be installed
*/
$fct = RMHttpRequest::get('fct', 'string', '');
$op = RMHttpRequest::get('op', 'string', '');
if ('modulesadmin' == $fct && 'install' == $op) {
$dirname = RMHttpRequest::get('module', 'string', '');
if ('' != $dirname) {
$module = new XoopsModule();
$module->loadInfoAsVar($dirname);
if ($module->getInfo('rmnative')) {
RMUris::redirect_with_message(__('Please install %s using the modules manager from Common Utilities to prevent errors during install.', 'rmcommon'), RMCURL . '/modules.php?action=install&dir=' . $dirname, RMMSG_WARN);
}
}
}
if (RMUris::current_url() == RMCURL . '/include/upload.php' && $xoopsConfig['closesite']) {
$security = rmc_server_var($_POST, 'rmsecurity', 0);
$data = TextCleaner::getInstance()->decrypt($security, true);
$data = explode("|", $data);
// [0] = referer, [1] = session_id(), [2] = user, [3] = token
$xoopsUser = new XoopsUser($data[0]);
if ($xoopsUser->isAdmin()) {
$xoopsConfig['closesite'] = 0;
}
}
RMEvents::get()->run_event('rmcommon.include.common.language');
}
开发者ID:txmodxoops,项目名称:rmcommon,代码行数:37,代码来源:core.php
示例5: b_weblog_links_show
function b_weblog_links_show($options)
{
global $xoopsDB, $xoopsUser;
$mydirname = empty($options[0]) ? basename(dirname(dirname(__FILE__))) : $options[0];
$link_module = $options[1];
$link_num = $options[2];
$only_post = $options[3];
$showdsc = $options[4];
if ($only_post == "1") {
if (!preg_match("|weblog\\d*/post\\.php\$|", $_SERVER['SCRIPT_NAME'])) {
return false;
}
}
$currentuid = !empty($xoopsUser) ? $xoopsUser->getVar('uid', 'E') : 0;
$user_id = !empty($_GET['user_id']) ? intval($_GET['user_id']) : 0;
$submitter = empty($user_id) ? $currentuid : $user_id;
$block = array();
if (preg_match("/^mylinks\\d*\$/", $options[0])) {
// in case of mylinks module
$sql = sprintf('SELECT c.title as category, l.title as title, url, description as dsc FROM %s as c, %s as l, %s as d WHERE c.cid=l.cid and d.lid=l.lid and status=1 ', $xoopsDB->prefix($options[0] . '_cat'), $xoopsDB->prefix($options[0] . '_links'), $xoopsDB->prefix($options[0] . '_text'));
if ($submitter) {
$sql = sprintf('%s and submitter=%d', $sql, $submitter);
}
$sql .= " order by l.cid,l.date ";
} elseif (preg_match("/^weblinks\\d*\$/", $options[0])) {
// in case of weblink module
$sql = sprintf('select link.title as title, link.url as url, link.description as dsc, cat.title as category from %s as cat, %s as link, %s as clink where link.lid=clink.lid and clink.cid=cat.cid ', $xoopsDB->prefix($options[0] . '_category'), $xoopsDB->prefix($options[0] . '_link'), $xoopsDB->prefix($options[0] . '_catlink'));
if ($submitter) {
$sql = sprintf('%s and link.uid=%d', $sql, $submitter);
}
$sql .= " order by clink.cid,clink.lid ";
}
if (!isset($sql)) {
return array();
}
$result = $xoopsDB->query($sql, $link_num, 0);
while ($myrow = $xoopsDB->fetchArray($result)) {
$category = $myrow['category'];
if (!isset($block['links'][$category])) {
$block['links'][$category] = array();
}
$block['links'][$category][] = array("title" => $myrow['title'], "url" => $myrow['url'], "dsc" => $myrow['dsc']);
}
if ($submitter) {
$blogOwner = new XoopsUser($submitter);
$block['lang_whose'] = sprintf(_MB_WEBLOG_LANG_LINKS_FOR, $blogOwner->getVar('uname', 'E'));
} else {
$block['lang_whose'] = _MB_WEBLOG_LANG_LINKS_FOR_EVERYONE;
}
if ($showdsc) {
$block['showdsc'] = 1;
}
return $block;
}
开发者ID:koki-h,项目名称:xoops_utf8,代码行数:54,代码来源:weblog_links.php
示例6: user_allowed_toupload
/**
* Check if given user is allowed
* @param object XoopsUser object
* @return bool
*/
public function user_allowed_toupload(XoopsUser $user)
{
$groups = $user->getGroups();
$allowed = $this->getVar('groups');
foreach ($groups as $id) {
if (in_array($id, $allowed['write'])) {
return true;
}
}
return false;
}
开发者ID:JustineBABY,项目名称:rmcommon,代码行数:16,代码来源:imagecategory.php
示例7: getLastUser
/**
* @desc Obtiene el último usuario registrado
* @return objeto {@link XoopsUser}
*/
function getLastUser()
{
$db = XoopsDatabaseFactory::getDatabaseConnection();
$result = $db->query("SELECT * FROM " . $db->prefix("users") . " WHERE level>'0' ORDER BY uid DESC LIMIT 0,1");
if ($db->getRowsNum($result) > 0) {
$row = $db->fetchArray($result);
$user = new XoopsUser();
$user->assignVars($row);
return $user;
}
return false;
}
开发者ID:petitours,项目名称:bxpress,代码行数:16,代码来源:bxfunctions.class.php
示例8: eventCoreIncludeCommonLanguage
/**
* To prevent errors when upload images with closed site
*/
public function eventCoreIncludeCommonLanguage()
{
global $xoopsConfig;
if (RMFunctions::current_url() == RMCURL . '/include/upload.php' && $xoopsConfig['closesite']) {
$security = rmc_server_var($_POST, 'rmsecurity', 0);
$data = TextCleaner::getInstance()->decrypt($security, true);
$data = explode("|", $data);
// [0] = referer, [1] = session_id(), [2] = user, [3] = token
$xoopsUser = new XoopsUser($data[0]);
if ($xoopsUser->isAdmin()) {
$xoopsConfig['closesite'] = 0;
}
}
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:17,代码来源:core.php
示例9: yogurt_iteminfo
function yogurt_iteminfo($category, $item_id)
{
$module_handler =& xoops_gethandler('module');
$module =& $module_handler->getByDirname('yogurt');
if ($category == 'global') {
$item['name'] = '';
$item['url'] = '';
return $item;
}
global $xoopsDB;
if ($category == 'picture') {
$sql = 'SELECT title,uid_owner,url FROM ' . $xoopsDB->prefix('yogurt_images') . ' WHERE uid_owner = ' . $item_id . ' LIMIT 1';
$result = $xoopsDB->query($sql);
$result_array = $xoopsDB->fetchArray($result);
/**
* Let's get the user name of the owner of the album
*/
$owner = new XoopsUser();
$identifier = $owner->getUnameFromId($result_array['uid_owner']);
$item['name'] = $identifier . "'s Album";
$item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/album.php?uid=' . $result_array['uid_owner'];
return $item;
}
if ($category == 'video') {
$sql = 'SELECT video_id,uid_owner,video_desc,youtube_code, mainvideo FROM ' . $xoopsDB->prefix('yogurt_images') . ' WHERE uid_owner = ' . $item_id . ' LIMIT 1';
$result = $xoopsDB->query($sql);
$result_array = $xoopsDB->fetchArray($result);
/**
* Let's get the user name of the owner of the album
*/
$owner = new XoopsUser();
$identifier = $owner->getUnameFromId($result_array['uid_owner']);
$item['name'] = $identifier . "'s Videos";
$item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/seutubo.php?uid=' . $result_array['uid_owner'];
return $item;
}
if ($category == 'scrap') {
$sql = 'SELECT scrap_id, scrap_from, scrap_to, scrap_text FROM ' . $xoopsDB->prefix('yogurt_scraps') . ' WHERE scrap_from = ' . $item_id . ' LIMIT 1';
$result = $xoopsDB->query($sql);
$result_array = $xoopsDB->fetchArray($result);
/**
* Let's get the user name of the owner of the album
*/
$owner = new XoopsUser();
$identifier = $owner->getUnameFromId($result_array['scrap_from']);
$item['name'] = $identifier . "'s Scraps";
$item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/scrapbook.php?uid=' . $result_array['scrap_from'];
return $item;
}
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:50,代码来源:notification.inc.php
示例10: b_marquee_xfsection
function b_marquee_xfsection($limit, $dateformat, $itemssize)
{
$block = array();
global $xoopsDB;
if (!function_exists('xfblock_checkAccess')) {
include_once XOOPS_ROOT_PATH . "/modules/xfsection/include/xfblock_groupaccess.php";
}
$myts =& MyTextSanitizer::getInstance();
$sql = "SELECT articleid, title, published, expired, counter, groupid, uid FROM " . $xoopsDB->prefix("xfs_article") . " WHERE published < " . time() . " AND published > 0 AND (expired = 0 OR expired > " . time() . ") AND noshowart = 0 AND offline = 0 ORDER BY published DESC";
$result = $xoopsDB->query($sql, $limit, 0);
while ($myrow = $xoopsDB->fetchArray($result)) {
if (xfblock_checkAccess($myrow["groupid"])) {
$wfs = array();
$title = $myts->htmlSpecialChars($myrow["title"]);
if (!XOOPS_USE_MULTIBYTES) {
if ($itemssize > 0) {
$title = $myts->htmlSpecialChars(substr($myrow['title'], 0, $itemssize - 1));
} else {
$title = $myts->htmlSpecialChars($myrow['title']);
}
}
$block[] = array('date' => formatTimestamp($myrow['published'], $dateformat), 'category' => '', 'author' => XoopsUser::getUnameFromId($myrow['uid']), 'title' => $title, 'link' => "<a href='" . XOOPS_URL . '/modules/xfsection/article.php?articleid=' . $myrow['articleid'] . "'>" . $title . '</a>');
}
}
return $block;
}
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:26,代码来源:xfsection.php
示例11: tadgallery_show_re
function tadgallery_show_re($options)
{
global $xoopsDB;
$limit = empty($options[0]) ? 10 : intval($options[0]);
$userinfo = empty($options[1]) ? 0 : intval($options[1]);
$showall = empty($options[2]) ? 0 : intval($options[2]);
$modhandler =& xoops_gethandler('module');
$xoopsModule =& $modhandler->getByDirname("tadgallery");
$com_modid = $xoopsModule->getVar('mid');
$sql = "select a.com_id,a.com_text,a.com_itemid,a.com_uid,b.title,b.filename,b.uid from " . $xoopsDB->prefix("xoopscomments") . " as a left join " . $xoopsDB->prefix("tad_gallery") . " as b on a.com_itemid=b.sn where a.com_modid='{$com_modid}' order by a.com_modified desc limit 0,{$limit}";
$result = $xoopsDB->query($sql);
$block = $comment = "";
$i = 0;
while (list($com_id, $txt, $nsn, $uid, $title, $filename, $poster_uid) = $xoopsDB->fetchRow($result)) {
$uid_name = XoopsUser::getUnameFromId($uid, 1);
$poster_uid_name = XoopsUser::getUnameFromId($poster_uid, 1);
$comment[$i]['uid'] = $uid;
$comment[$i]['uid_name'] = empty($uid_name) ? XoopsUser::getUnameFromId($uid, 0) : $uid_name;
$comment[$i]['poster_uid'] = $poster_uid;
$comment[$i]['poster_uid_name'] = empty($poster_uid_name) ? XoopsUser::getUnameFromId($poster_uid, 0) : $poster_uid_name;
$comment[$i]['nsn'] = $nsn;
$comment[$i]['com_id'] = $com_id;
$comment[$i]['txt'] = $txt;
$comment[$i]['title'] = empty($title) ? $filename : $title;
$i++;
}
$block['showall'] = $showall;
$block['userinfo'] = $userinfo;
$block['comment'] = $comment;
return $block;
}
开发者ID:geek01,项目名称:tadgallery,代码行数:31,代码来源:tadgallery_re_block.php
示例12: mypics_iteminfo
function mypics_iteminfo($category, $item_id)
{
$item['name'] = '';
$item['url'] = '';
if ($category == 'picture') {
global $xoopsDB;
$module_handler =& xoops_gethandler('module');
$module =& $module_handler->getByDirname('mypics');
$sql = 'SELECT title, uid, url FROM ' . $xoopsDB->prefix('yogurt_images') . ' WHERE uid = ' . $item_id . ' LIMIT 1';
$result = $xoopsDB->query($sql);
$result_array = $xoopsDB->fetchArray($result);
$owner = new XoopsUser();
$identifier = $owner->getUnameFromId($result_array['uid']);
$item['name'] = $identifier . "'s Album";
$item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/index.php?uid=' . $result_array['uid'];
}
return $item;
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:18,代码来源:notification.inc.php
示例13: b_mp_cont_show
function b_mp_cont_show($options)
{
global $xoopsDB, $xoopsUser, $xoopsModuleConfig, $HTTP_SERVER_VARS;
if (is_object($xoopsUser)) {
$uid = $xoopsUser->getVar('uid');
$uname = $xoopsUser->getVar('uname');
} else {
$uid = 0;
$uname = '';
}
$block = array();
if (!is_object($xoopsUser)) {
$block['lang_none'] = _MP_BL_YOUDONTHAVE;
} else {
$online = 0;
$offline = 0;
$user = '';
$cont_handler =& xoops_gethandler('priv_msgscont');
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('ct_userid', $xoopsUser->getVar('uid')));
$amount = $cont_handler->getCount($criteria);
$criteria->setSort('ct_uname');
$criteria->setOrder('desc');
$pm_cont =& $cont_handler->getObjects($criteria);
foreach (array_keys($pm_cont) as $i) {
$poster = new XoopsUser($pm_cont[$i]->getVar('ct_contact'));
/* Online poster */
if ($poster->isOnline()) {
$user .= "<a href='javascript:openWithSelfMain(\"" . XOOPS_URL . "/pmlite.php?send2=1&to_userid=" . $pm_cont[$i]->getVar('ct_contact') . "\",\"pmlite\", 450, 380)'>" . $poster->getVar('uname') . "</a>, ";
$online++;
} else {
$offline++;
}
}
$block['online_total'] = $amount;
$block['online'] = $online;
$block['offline'] = $offline;
$block['user'] = $user;
$block['lang_online'] = _MP_BLOCK_ONLINE;
$block['lang_offline'] = _MP_BLOCK_OFFLINE;
$block['lang_contact'] = _MP_BLOCK_CONTACT;
}
return $block;
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:44,代码来源:mp_cont.php
示例14: get_submitter_info
function get_submitter_info($uid)
{
if ($uid <= 0) {
return _GUESTS;
}
$poster = new XoopsUser($uid);
// check if invalid uid
if ($poster->uname() == '') {
return '';
}
if ($this->nameoruname == 'uname') {
$name = $poster->uname();
} else {
$name = trim($poster->name());
if ($name == "") {
$name = $poster->uname();
}
}
return "<a href='" . XOOPS_URL . "/userinfo.php?uid={$uid}'>{$name}</a>";
}
开发者ID:BackupTheBerlios,项目名称:peakxoops-svn,代码行数:20,代码来源:piCal_xoops.php
示例15: getValues
public function getValues($keys = null, $format = null, $maxDepth = null)
{
$page = Page::getInstance();
$ret = parent::getValues($keys, $format, $maxDepth);
$ret['rating'] = number_format($this->getVar('content_rating'), 1);
// these next two lines are rather silly
$ret['content_authorid'] = $this->getVar('content_author');
$ret['content_author'] = XoopsUser::getUnameFromId($this->getVar('content_author'), true);
$ret['content_date'] = XoopsLocale::formatTimestamp($this->getVar('content_create'), $page->getConfig('page_dateformat'));
$ret['content_time'] = XoopsLocale::formatTimestamp($this->getVar('content_create'), $page->getConfig('page_timeformat'));
$ret['content_rating'] = number_format($this->getVar('content_rating'), 2);
return $ret;
}
开发者ID:RanLee,项目名称:XoopsCore,代码行数:13,代码来源:page_content.php
示例16: addOptionUsers
function addOptionUsers($gid = 0)
{
list($cuid) = $this->getValue();
$max = _CC_MAX_USERS;
$start = isset($_REQUEST['start']) ? intval($_REQUEST['start']) : 0;
$users = cc_group_users($gid, $max, $start);
$opts = $this->getOptions();
// force insert current if none
if ($cuid && !isset($users[$cuid]) && !isset($opts[$cuid])) {
$users[$cuid] = XoopsUser::getUnameFromId($cuid);
}
$this->addOptionArray($users);
$this->setPageNav($gid);
}
开发者ID:nbuy,项目名称:xoops-modules-ccenter,代码行数:14,代码来源:myformselect.php
示例17: uname
/**
* Returns the user name for the current keyword (if the parameter is null)
*/
function uname($uid = 0)
{
global $xoopsConfig;
static $tblusers = array();
$option = -1;
if (empty($uid)) {
$uid = $this->getVar('uid');
}
if (is_array($tblusers) && array_key_exists($uid, $tblusers)) {
return $tblusers[$uid];
}
$tblusers[$uid] = XoopsUser::getUnameFromId($uid);
return $tblusers[$uid];
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:17,代码来源:searches.php
示例18: showReports
function showReports()
{
global $xoopsModule, $xoopsConfig, $xoopsSecurity;
//Indica la lista a mostrar
$show = isset($_REQUEST['show']) ? intval($_REQUEST['show']) : '0';
//$show = 0 Muestra todos los reportes
//$show = 1 Muestra los reportes revisados
//$show = 2 Muestra los reportes no revisados
define('RMCSUBLOCATION', $show == 0 ? 'allreps' : ($show == 1 ? 'reviews' : 'noreviewd'));
$db = XoopsDatabaseFactory::getDatabaseConnection();
//Lista de Todos los reportes
$sql = "SELECT * FROM " . $db->prefix('mod_bxpress_report') . ($show ? $show == 1 ? " WHERE zapped=1" : " WHERE zapped=0 " : '') . " ORDER BY report_time DESC";
$result = $db->queryF($sql);
$reports = array();
$tf = new RMTimeFormatter(0, '%T% %d%, %Y% %h%:%i%:%s%');
while ($rows = $db->fetchArray($result)) {
$report = new bXReport();
$report->assignVars($rows);
$user = new XoopsUser($report->user());
$post = new bXPost($report->post());
$topic = new bXTopic($post->topic());
$forum = new bXForum($post->forum());
if ($report->zappedBy() > 0) {
$zuser = new XoopsUser($report->zappedBy());
}
$reports[] = array('id' => $report->id(), 'post' => array('link' => $post->permalink(), 'id' => $report->post()), 'user' => $user->uname(), 'uid' => $user->uid(), 'date' => $tf->format($report->time()), 'report' => $report->report(), 'forum' => array('link' => $forum->permalink(), 'name' => $forum->name()), 'topic' => array('link' => $topic->permalink(), 'title' => $topic->title()), 'zapped' => $report->zapped(), 'zappedby' => $report->zappedby() > 0 ? array('uid' => $zuser->uid(), 'name' => $zuser->uname()) : '', 'zappedtime' => $report->zappedtime() > 0 ? $tf->format($report->zappedtime()) : '');
}
RMTemplate::get()->add_local_script('jquery.checkboxes.js', 'rmcommon', 'include');
RMTemplate::get()->add_local_script('admin.js', 'bxpress');
RMTemplate::get()->set_help('http://www.redmexico.com.mx/docs/bxpress-forums/introduccion/standalone/1/');
RMTemplate::get()->assign('xoops_pagetitle', __('Reports Management', 'bxpress'));
$bc = RMBreadCrumb::get();
$bc->add_crumb(__('Reports management', 'bxpress'));
xoops_cp_header();
include RMTemplate::get()->get_template('admin/forums-reports.php', 'module', 'bxpress');
xoops_cp_footer();
}
开发者ID:petitours,项目名称:bxpress,代码行数:37,代码来源:reports.php
示例19: b_marquee_xfaq
function b_marquee_xfaq($limit, $dateformat, $itemssize)
{
include_once XOOPS_ROOT_PATH . '/modules/marquee/include/functions.php';
$block = array();
$myts =& MyTextSanitizer::getInstance();
$db =& Database::getInstance();
$result = $db->query("SELECT f.*, t.topic_title, t.topic_submitter FROM " . $db->prefix("xfaq_faq") . " f, " . $db->prefix("xfaq_topic") . " t WHERE f.faq_online>0 AND (f.faq_topic=t.topic_id) ORDER BY faq_date_created DESC", $limit, 0);
while ($myrow = $db->fetchArray($result)) {
$title = $myts->htmlSpecialChars($myrow["faq_question"]);
if ($itemssize > 0) {
$title = xoops_substr($title, 0, $itemssize + 3);
}
$block[] = array('date' => formatTimestamp($myrow['faq_date_created'], $dateformat), 'category' => $myts->htmlSpecialChars($myrow['topic_title']), 'author' => XoopsUser::getUnameFromId(intval($myrow['topic_submitter'])), 'title' => $title, 'link' => "<a href='" . XOOPS_URL . "/modules/xfaq/faq.php?faq_id=" . $myrow['faq_id'] . "'>{$title}</a>");
}
return $block;
}
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:16,代码来源:xfaq.php
示例20: b_marquee_catads
function b_marquee_catads($limit, $dateformat, $itemssize)
{
global $xoopsModule, $xoopsModuleConfig, $xoopsDB;
include_once XOOPS_ROOT_PATH . '/modules/catads/class/cat.php';
$block = array();
if (empty($xoopsModule) || $xoopsModule->getVar('dirname') != 'catads') {
$module_handler =& xoops_gethandler('module');
$module =& $module_handler->getByDirname('catads');
$config_handler =& xoops_gethandler('config');
$config =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));
} else {
$module =& $xoopsModule;
$config =& $xoopsModuleConfig;
}
//echo '<br />ok';
$ads_hnd =& xoops_getmodulehandler('ads', 'catads');
$criteria = new CriteriaCompo(new Criteria('waiting', '0'));
$criteria->add(new Criteria('published', time(), '<'));
$criteria->add(new Criteria('expired', time(), '>'));
$criteria->setSort('published');
$criteria->setOrder('DESC');
$criteria->setLimit($options[0]);
$nbads = $ads_hnd->getCount($criteria);
$a_item = array();
$cat_buffer = array();
if ($nbads > 0) {
$ads = $ads_hnd->getObjects($criteria);
$ts =& MyTextSanitizer::getInstance();
foreach ($ads as $oneads) {
if ($itemssize > 0) {
$title = xoops_substr($oneads->getVar('ads_title'), 0, $itemssize);
} else {
$title = $oneads->getVar('ads_title');
}
if (!isset($cat_buffer[$oneads->getVar('cat_id')])) {
$tmpcat = new AdsCategory($oneads->getVar('cat_id'));
$cat_buffer[$oneads->getVar('cat_id')] = $tmpcat->title();
$cat_title = $tmpcat->title();
} else {
$cat_title = $cat_buffer[$oneads->getVar('cat_id')];
}
$block[] = array('date' => formatTimestamp($oneads->getVar('published'), $dateformat), 'category' => '', 'author' => XoopsUser::getUnameFromId($oneads->getVar('uid')), 'title' => $title, 'link' => "<a href='" . XOOPS_URL . '/modules/catads/adsitem.php?ads_id=' . $oneads->getVar('ads_id') . "'>" . $title . '</a>');
unset($a_item);
}
}
return $block;
}
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:47,代码来源:catads.php
注:本文中的XoopsUser类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论