- md5
- 9408496d92fcf7072e863126e176b3ec
- sha1
- 10ece0474ccf5fdb16eae0f304291dfe9c77f387
- sha256
- 15be70adc9c65dd9b9454744cea6c1df87bcecb2a33dc38b061164c62e0843d3
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
<?php
/**
* @version $Id: admin.users.html.php 736 2005-10-31 03:35:38Z stingrey $
* @package Joomla
* @subpackage Users
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html 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( '_VALID_MOS' ) or die( 'Restricted access' );
/**
* @package Joomla
* @subpackage Users
*/
class HTML_users {
function showUsers( &$rows, $pageNav, $search, $option, $lists ) {
?>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th class="user">
User Manager
</th>
<td>
Filter:
</td>
<td>
<input type="text" name="search" value="<?php echo $search;?>" class="inputbox" onChange="document.adminForm.submit();" />
</td>
<td width="right">
<?php echo $lists['type'];?>
</td>
<td width="right">
<?php echo $lists['logged'];?>
</td>
</tr>
</table>
<table class="adminlist">
<tr>
<th width="2%" class="title">
#
</th>
<th width="3%" class="title">
<input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count($rows); ?>);" />
</th>
<th class="title">
Name
</th>
<th width="15%" class="title" >
Username
</th>
<th width="5%" class="title" nowrap="nowrap">
Logged In
</th>
<th width="5%" class="title">
Enabled
</th>
<th width="15%" class="title">
Group
</th>
<th width="15%" class="title">
E-Mail
</th>
<th width="10%" class="title">
Last Visit
</th>
<th width="1%" class="title">
ID
</th>
</tr>
<?php
$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 ? 'Enabled' : 'Blocked';
$link = 'index2.php?option=com_users&task=editA&id='. $row->id. '&hidemainmenu=1';
?>
<tr class="<?php echo "row$k"; ?>">
<td>
<?php echo $i+1+$pageNav->limitstart;?>
</td>
<td>
<?php echo mosHTML::idBox( $i, $row->id ); ?>
</td>
<td>
<a href="<?php echo $link; ?>">
<?php echo $row->name; ?>
</a>
<td>
<?php echo $row->username; ?>
</td>
</td>
<td align="center">
<?php echo $row->loggedin ? '<img src="images/tick.png" width="12" height="12" border="0" alt="" />': ''; ?>
</td>
<td>
<a href="javascript: void(0);" onClick="return listItemTask('cb<?php echo $i;?>','<?php echo $task;?>')">
<img src="images/<?php echo $img;?>" width="12" height="12" border="0" alt="<?php echo $alt; ?>" />
</a>
</td>
<td>
<?php echo $row->groupname; ?>
</td>
<td>
<a href="mailto:<?php echo $row->email; ?>">
<?php echo $row->email; ?>
</a>
</td>
<td nowrap="nowrap">
<?php echo mosFormatDate( $row->lastvisitDate, "%Y-%m-%d %H:%M:%S" ); ?>
</td>
<td>
<?php echo $row->id; ?>
</td>
</tr>
<?php
$k = 1 - $k;
}
?>
</table>
<?php echo $pageNav->getListFooter(); ?>
<input type="hidden" name="option" value="<?php echo $option;?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="hidemainmenu" value="0" />
</form>
<?php
}
function edituser( &$row, &$contact, &$lists, $option, $uid, &$params ) {
global $my, $acl;
global $mosConfig_live_site;
$tabs = new mosTabs( 0 );
mosCommonHTML::loadOverlib();
$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' ) );
?>
<script language="javascript" type="text/javascript">
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( "You must provide a name." );
} else if (form.username.value == "") {
alert( "You must provide a user login name." );
} else if (r.exec(form.username.value) || form.username.value.length < 3) {
alert( "You login name contains invalid characters or is too short." );
} else if (trim(form.email.value) == "") {
alert( "You must provide an email address." );
} else if (form.gid.value == "") {
alert( "You must assign user to a group." );
} else if (trim(form.password.value) != "" && form.password.value != form.password2.value){
alert( "Password do not match." );
} else if (form.gid.value == "29") {
alert( "Please Select another group as `Public Frontend` is not a selectable option" );
} else if (form.gid.value == "30") {
alert( "Please Select another group as `Public Backend` is not a selectable option" );
} else {
submitform( pressbutton );
}
}
function gotocontact( id ) {
var form = document.adminForm;
form.contact_id.value = id;
submitform( 'contact' );
}
</script>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th class="user">
User: <small><?php echo $row->id ? 'Edit' : 'Add';?></small>
</th>
</tr>
</table>
<table width="100%">
<tr>
<td width="60%" valign="top">
<table class="adminform">
<tr>
<th colspan="2">
User Details
</th>
</tr>
<tr>
<td width="100">
Name:
</td>
<td width="85%">
<input type="text" name="name" class="inputbox" size="40" value="<?php echo $row->name; ?>" />
</td>
</tr>
<tr>
<td>
Username:
</td>
<td>
<input type="text" name="username" class="inputbox" size="40" value="<?php echo $row->username; ?>" />
</td>
<tr>
<td>
Email:
</td>
<td>
<input class="inputbox" type="text" name="email" size="40" value="<?php echo $row->email; ?>" />
</td>
</tr>
<tr>
<td>
New Password:
</td>
<td>
<input class="inputbox" type="password" name="password" size="40" value="" />
</td>
</tr>
<tr>
<td>
Verify Password:
</td>
<td>
<input class="inputbox" type="password" name="password2" size="40" value="" />
</td>
</tr>
<tr>
<td valign="top">
Group:
</td>
<td>
<?php echo $lists['gid']; ?>
</td>
</tr>
<?php
if ($canBlockUser) {
?>
<tr>
<td>
Block User
</td>
<td>
<?php echo $lists['block']; ?>
</td>
</tr>
<?php
}
if ($canEmailEvents) {
?>
<tr>
<td>
Receive System Emails
</td>
<td>
<?php echo $lists['sendEmail']; ?>
</td>
</tr>
<?php
}
if( $uid ) {
?>
<tr>
<td>
Register Date
</td>
<td>
<?php echo $row->registerDate;?>
</td>
</tr>
<tr>
<td>
Last Visit Date
</td>
<td>
<?php echo $row->lastvisitDate;?>
</td>
</tr>
<?php
}
?>
<tr>
<td colspan="2">
</td>
</tr>
</table>
</td>
<td width="40%" valign="top">
<table class="adminform">
<tr>
<th colspan="1">
<?php echo 'Parameters'; ?>
</th>
</tr>
<tr>
<td>
<?php echo $params->render( 'params' );?>
</td>
</tr>
</table>
<?php
if ( !$contact ) {
?>
<table class="adminform">
<tr>
<th>
Contact Information
</th>
</tr>
<tr>
<td>
<br />
No Contact details linked to this User:
<br />
See 'Components -> Contact -> Manage Contacts' for details.
<br /><br />
</td>
</tr>
</table>
<?php
} else {
?>
<table class="adminform">
<tr>
<th colspan="2">
Contact Information
</th>
</tr>
<tr>
<td width="15%">
Name:
</td>
<td>
<strong>
<?php echo $contact[0]->name;?>
</strong>
</td>
</tr>
<tr>
<td>
Position:
</td>
<td >
<strong>
<?php echo $contact[0]->con_position;?>
</strong>
</td>
</tr>
<tr>
<td>
Telephone:
</td>
<td >
<strong>
<?php echo $contact[0]->telephone;?>
</strong>
</td>
</tr>
<tr>
<td>
Fax:
</td>
<td >
<strong>
<?php echo $contact[0]->fax;?>
</strong>
</td>
</tr>
<tr>
<td></td>
<td >
<strong>
<?php echo $contact[0]->misc;?>
</strong>
</td>
</tr>
<?php
if ($contact[0]->image) {
?>
<tr>
<td></td>
<td valign="top">
<img src="<?php echo $mosConfig_live_site;?>/images/stories/<?php echo $contact[0]->image; ?>" align="middle" alt="Contact" />
</td>
</tr>
<?php
}
?>
<tr>
<td colspan="2">
<br /><br />
<input class="button" type="button" value="change Contact Details" onclick="javascript: gotocontact( '<?php echo $contact[0]->id; ?>' )">
<i>
<br />
'Components -> Contact -> Manage Contacts'.
</i>
</td>
</tr>
</table>
<?php
}
?>
</td>
</tr>
</table>
<input type="hidden" name="id" value="<?php echo $row->id; ?>" />
<input type="hidden" name="option" value="<?php echo $option; ?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="contact_id" value="" />
<?php
if (!$canEmailEvents) {
?>
<input type="hidden" name="sendEmail" value="0" />
<?php
}
?>
</form>
<?php
}
}
?>
The same content is in 3 releases, Joomla 1.0.6 to 1.0.8. See them all, or every version of this file.