Location: PHPKode > projects > BugIn and Ticketing System > bugin-0.65/inc/admin/uedit.inc.php
<?php
if (!isset($showUser)) {
	echo <<<EOT

<table border="0">
	<tr align="center">
		<td><img src="gfx/uedit.png" border="0"><br>{$verbage['adm_user_editor']}</td>
	</tr>
</table>
<hr>

EOT;
}

if (isset($ueditMessage)) {
	echo <<<EOT
<pre>$ueditMessage</pre>

EOT;
}

if (!$userinfo['isAdmin'] || isset($showUser)) {
	echo <<<EOT
<form method="{$options['formMethod']}" action="{$options['baseURL']}{$options['formSubmitTo']}">
<input type="hidden" name="area" value="admin" />
<input type="hidden" name="action" value="uedit" />
<input type="hidden" name="adminWriteChanges" value="1" />
{$formFields}
<b>{$verbage['username']}: {$adminUserInfo['username']}</b>
<hr>
<table cellpadding="0" cellspacing="0">
	<tr>
		<td>{$verbage['name']}:</td>
		<td><input type="text" name="mod[name]" value="{$adminUserInfo['name']}"></td>
		<td>{$verbage['comment']}:</td>
	</tr>

EOT;

	if ($userinfo['isAdmin']) {
		echo <<<EOT
	<tr>
		<td>{$verbage['groups']}:</td>
		<td><select NAME="mod[user_group][]" MULTIPLE>

EOT;

		while (list($key, $value) = each($bugDatabase->lists['group'])) {
			if (in_array($value['gid'], $adminUserInfo['user_group']) )
				$selected = " SELECTED";
			else
				$selected = "";

			$gname = htmlentities($value['group_name']);
			echo <<<EOT
	<OPTION VALUE="{$value['gid']}"{$selected}>{$gname}</OPTION>

EOT;
		}

		$commentrow = "";
		echo <<<EOT
		</select></td>
		<td rowspan="9"><textarea name="mod[comment]" rows=30 cols=80>$comment</textarea></td>
	</tr>

EOT;
	}

	echo <<<EOT
	<tr>
		<td rowspan="3">{$verbage['adm_change_pwd']}</td>
		<td>{$verbage['password']}:</td>
	</tr>
	<tr>
		<td>{$verbage['adm_new_pwd']}<br />
		<input type="password" name="mod[passwd1]"></td>
	</tr>
	<tr>
		<td>{$verbage['adm_new_pwd_verify']}<br />
		<input type="password" name="mod[passwd2]"></td>
	</tr>
	<tr>
		<td>{$verbage['sup_email']}</td>
		<td><input type="text" name="mod[email]" value="{$adminUserInfo['email']}"></td>
	</tr>
	<tr>
		<td>{$verbage['sup_phone']}</td>
		<td><input type="text" name="mod[phone]" value="{$adminUserInfo['phone']}"></td>
	</tr>
	<tr>
		<td>{$verbage['language']}</td>
		<td>
			<select name="mod[lang]">
				$langList
			</select>
		</td>
	</tr>
	<tr>
		<td>{$verbage['adm_options']}</td>
		<td>
			<nobr><input type="checkbox" name="mod[flags][frames]"{$userOptions['frames']} />{$verbage['adm_opt_frames']}</nobr><br>
			<nobr><input type="checkbox" name="mod[flags][notify]"{$userOptions['notify']} />{$verbage['adm_opt_notify']}</nobr><br>
			<nobr><input type="checkbox" name="mod[flags][popup]"{$userOptions['popup']} /> Popup windows</nobr><br>
			<nobr><input type="checkbox" name="mod[flags][refresh_list]"{$userOptions['refresh_list']} />{$verbage['adm_usr_refresh']}</nobr><br>
			<nobr><input type="checkbox" name="mod[flags][list_sort_reverse]"{$userOptions['list_sort_reverse']} />{$verbage['adm_usr_reverse']}</nobr><br>
			<nobr><input type="checkbox" name="mod[flags][short_notification_notify]"{$userOptions['short_notification_notify']} />{$verbage['adm_usr_short_notify']}</nobr><br>
			<nobr><input type="checkbox" name="mod[flags][no_paging]"{$userOptions['no_paging']} />{$verbage['adm_usr_no_paging']}</nobr><br>
		</td>
	</tr>
	<tr>
		<td colspan="2">
			<input type="submit" value="{$verbage['adm_update_user']}">
		</td>
	</tr>
</table>
</form>
EOT;
	}

if ( !isset($selectedUser) && $userinfo['isAdmin'] && !isset($adminWriteChanges) )  {
		echo <<<EOT
	<br />{$verbage['adm_usr_edit']}
	<table border=1>
		<tr>
			<th>ID</th>
			<th><b>Name</th>
			<th><b>{$verbage['username']}</th>
			<th><b>{$verbage['delete']}</th>
		</tr>
EOT;
		reset($bugDatabase->lists['user']);
		while (list($key, $value) = each($bugDatabase->lists['user'])) {
			$uname = htmlentities($value['username']);
			$name = htmlentities($value['name']);
			echo <<<EOT
		<tr>
			<td><a href="{$options['baseURL']}?area=admin&action=uedit&selectedUser={$value['uid']}">{$key}</a></td>
			<td><a href="{$options['baseURL']}?area=admin&action=uedit&selectedUser={$value['uid']}">{$name}</a></td>
			<td><a href="{$options['baseURL']}?area=admin&action=uedit&selectedUser={$value['uid']}">{$uname}</a></td>
			<td><a href="{$options['baseURL']}?area=admin&action=udelete&selectedUser={$value['uid']}">[{$verbage['delete']}]</a></td>
		</tr>

EOT;

		}
		echo <<<EOT
	</table><br />
	[<a href="{$options['baseURL']}?area=admin&action=uadd">{$verbage['adm_usr_add']}</a>]<br />
EOT;
	}
?>
Return current item: BugIn and Ticketing System