mambo的cms源代码
源代码在线查看: admin.users.html.php
/** * @version $Id: admin.users.html.php,v 1.11 2005/02/15 12:21:09 kochp Exp $ * @package Mambo * @subpackage Users * @copyright (C) 2000 - 2005 Miro International Pty Ltd * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * Mambo is Free Software */ /** ensure this file is being included by a parent file */ defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); /** * @package Mambo * @subpackage Users */ class HTML_users { function showUsers( &$rows, $pageNav, $search, $option, $lists ) { global $mosConfig_offset, $adminLanguage; ?> : $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 ? $adminLanguage->A_COMP_STAT_ENABLED : $adminLanguage->A_COMP_USERS_BLOCKED; $link = 'index2.php?option=com_users&task=editA&id='. $row->id. '&hidemainmenu=1'; ?> $k = 1 - $k; } ?> } function edituser( &$row, &$contact, &$lists, $option, $uid ) { global $my, $acl, $adminLanguage; global $mosConfig_live_site; $tabs =& new mosTabs( 0 ); $canBlockUser = $acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'user properties', 'block_user' ); $canEmailEvents = $acl->acl_check( 'workflow', 'email_events', 'users', $acl->get_group_name( $row->gid, 'ARO' ) ); ?> 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 < 3) { 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( $uid ) { ?> } ?> if ( !$contact ) { ?> } else { ?> : : : : if ($contact[0]->image) { ?> } ?> '' } ?> if (!$canEmailEvents) { ?> } ?> } } ?>