Joomla15 - 最新开源CMS
源代码在线查看: admin.users.html.php
/** * @version $Id: admin.users.html.php 8345 2007-08-07 09:20:52Z eddieajau $ * @package Joomla * @subpackage Users * @copyright Copyright (C) 2005 - 2007 Open Source Matters. All rights reserved. * @license GNU/GPL, see LICENSE.php * Joomla! is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. */ // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); /** * @package Joomla * @subpackage Users */ class HTML_users { /** * Display list of users */ function showUsers( &$rows, &$page, $option, &$lists ) { $limitstart = JRequest::getVar('limitstart', '0', '', 'int'); $user =& JFactory::getUser(); JHTML::_('behavior.tooltip'); ?> : $k = 0; for ($i=0, $n=count( $rows ); $i < $n; $i++) { $row =& $rows[$i]; $img = $row->block ? 'publish_x.png' : 'tick.png'; $task = $row->block ? 'unblock' : 'block'; $alt = $row->block ? JText::_( 'Enabled' ) : JText::_( 'Blocked' ); $link = 'index.php?option=com_users&task=edit&cid[]='. $row->id. ''; if ($row->lastvisitDate == "0000-00-00 00:00:00") { $lvisit = "Never"; } else { $lvisit = $row->lastvisitDate; //= JHTML::_('date', $row->lastvisitDate, JText::_('DATE_FORMAT_LC4')); } ?> $k = 1 - $k; } ?> } /** * Form for editing a user */ function edituser( &$user, &$contact, &$lists, $option ) { JRequest::setVar( 'hidemainmenu', 1 ); global $mainframe; // clean item data jimport('joomla.filter.output'); JFilterOutput::objectHTMLSafe( $user, ENT_QUOTES, '' ); /* * Initialize variables */ $acl = & JFactory::getACL(); JHTML::_('behavior.tooltip'); $canBlockUser = $user->authorize( 'com_user', 'block user' ); $canEmailEvents = $acl->acl_check( 'workflow', 'email_events', 'users', $acl->get_group_name( $user->get('gid'), 'ARO' ) ); $lvisit = $user->get('lastvisitDate'); if ($lvisit == "0000-00-00 00:00:00") { $lvisit = "Never"; } ?> function submitbutton(pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { submitform( pressbutton ); return; } var r = new RegExp("[\|\"|\'|\%|\;|\(|\)|\&|\+|\-]", "i"); // do field validation if (trim(form.name.value) == "") { alert( "" ); } else if (form.username.value == "") { alert( "" ); } else if (r.exec(form.username.value) || form.username.value.length < 2) { alert( "" ); } else if (trim(form.email.value) == "") { alert( "" ); } else if (form.gid.value == "") { alert( "" ); } else if (trim(form.password.value) != "" && form.password.value != form.password2.value){ alert( "" ); } else if (form.gid.value == "29") { alert( "" ); } else if (form.gid.value == "30") { alert( "" ); } else { submitform( pressbutton ); } } function gotocontact( id ) { var form = document.adminForm; form.contact_id.value = id; submitform( 'contact' ); } if ($canBlockUser) { ?> } if ($canEmailEvents) { ?> } if( $user->get('id') ) { ?> } ?> $params = $user->getParameters(); $params->loadSetupFile(JApplicationHelper::getPath( 'com_xml', 'com_users' )); echo $params->render( 'params' ); ?> if ( !$contact ) { ?> : . } else { ?> if ($contact[0]->image) { ?> } ?> '' } ?> if (!$canEmailEvents) { ?> } ?> } } ?>