<?php
// $Id: members_new.php,v 1.5 2003/03/19 07:02:26 half-dead Exp $
// ------------------------------------------------------------------------- //
//               E-Xoops: Content Management for the Masses                  //
//                       < http://www.e-xoops.com >                          //
// ------------------------------------------------------------------------- //
// Original Author: Kazumi Ono
// Author Website : http://www.mywebaddons.com/ , http://www.myweb.ne.jp
// License Type   : GPL: See /manual/LICENSES/GPL.txt
// ------------------------------------------------------------------------- //
function b_xoopsmembers_new_show($options){
	$block = array();
	$block['content'] = "<table border='0' cellpadding='0' cellspacing='0' valign='top' width='100%'><tr><td class='bg2'><table width='100%' border='0' cellpadding='4' cellspacing='1'>\n";
	$criteria = array("level>0");
	$limit = (!empty($options[0])) ? $options[0] : 10;
	$newmembers =& XoopsUser::getAllUsers($criteria, true, "user_regdate DESC", $limit);
	foreach ( $newmembers as $nb ) {
		$block['content'] .= "<tr class='bg1'>";
		if ( $options[1] == 1 ) {
			$avatar = $nb->getVar("user_avatar") ? "<img src='".XOOPS_URL."/images/avatar/".$nb->getVar("user_avatar")."' alt='' width='32' />" : "&nbsp;";
			$block['content'] .= "<td align='center'>$avatar</td>";
		}
		$block['content'] .= "<td><a href='".XOOPS_URL."/userinfo.php?uid=".$nb->getVar("uid")."'>".$nb->getVar("uname")."</a></td><td align='center'>".formatTimestamp($nb->getVar("user_regdate"), "s")."</td>";
	}
	$block['content'] .= "</tr></table></td></tr></table>\n";
	$block['title'] = _MB_MEMBERS_TITLE2;
	return $block;
}
function b_xoopsmembers_new_edit($options) {
	$inputtag = "<input type='text' class='text' name='options[]' value='".$options[0]."' />";
	$form = sprintf(_MB_MEMBERS_DISPLAY,$inputtag);
	$form .= "<br />"._MB_MEMBERS_DISPLAYA."&nbsp;<input type='radio' class='radio' id='options[]' name='options[]' value='1'";
	if ( $options[1] == 1 ) {
		$form .= " checked='checked'";
	}
	$form .= " />&nbsp;"._YES."<input type='radio' class='radio' id='options[]' name='options[]' value='0'";
	if ( $options[1] == 0 ) {
		$form .= " checked='checked'";
	}
	$form .= " />&nbsp;"._NO."";
	return $form;
}
?>
