Location: PHPKode > projects > Terra-Terra, A Virtual Operating System > terra-terra.0.0.5/workareas/User/TTuserinfo.php
<?php
/****m*
 * NAME
 *  TTuserinfo.php --- Workarea of the TT User application
 *
 * DESCRIPTION
 *  Define a workarea where the user can change his/her information,
 *  password etc.
 *
 * AUTHOR
 *  Oscar van Eijk, Oveas Functionality Provider
 *
 * COPYRIGHT
 *  (c) 2003-2005 by Oscar van Eijk/Oveas Functionality Provider 
 ***/
/*
 * This module is part of Terra-Terra, the Virtual Operating System
 * http://terra-terra.com
 * ------------------------------------------------------------------------
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License,
 * or any later version.
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library; if not, write to the Free Software Foundation,
 * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 * ------------------------------------------------------------------------
 * $Id: TTuserinfo.php,v 1.2 2005/07/19 18:17:40 tt_oscar Exp $ 
 */
 
if (!defined ('TT_MASTER_PROCESS')) {
	if (function_exists ('version_compare')) {
		$__TTroot = $_COOKIE['TTroot'];
	} else {
		$__TTroot = $HTTP_COOKIE_VARS['TTroot'];
	}
	require_once ($__TTroot . '/kernel/TTinit.pinc');
}

echo (TT_header());

echo ('<h2>');
echo ($TT_workspace->get_prompt('USRINFO', 'USERNAME=' . $TT_user->username));
echo ('</h2>');
echo (TT_form_open($TT['env_server']['PHP_SELF'], "save_userinf", $ThisArea)); 
?>
<table>
  <tbody>
	<tr>
		<td colspan="3"><h3><?php echo ($TT_workspace->get_prompt('CHPWD')); ?></h3></td>
	</tr>

	<tr>
		<td><?php echo ($TT_workspace->get_prompt('OLDPWD')); ?></td>
		<td><?php echo ($TT_workspace->get_prompt('NEWPWD')); ?></td>
		<td><?php echo ($TT_workspace->get_prompt('VERPWD')); ?></td>
	</tr>  
	<tr>
		<td><input type="password" name="cpassw" size="10" maxlength="16" /></td>
		<td><input type="password" name="npass1" size="10" maxlength="16" /></td>
		<td><input type="password" name="npass2" size="10" maxlength="16" /></td>
	</tr>  

	<tr>
		<td colspan="3">&nbsp;</td>
	</tr>  

	<tr>
		<td colspan=3><h3><?php echo ($TT_workspace->get_prompt('USERINF')); ?></h3></td>
	</tr>

	<tr>
		<td><?php echo ($TT_workspace->get_prompt('FIRSTNM')); ?></td>
		<td><?php echo ($TT_workspace->get_prompt('MIDDNM')); ?></td>
		<td><?php echo ($TT_workspace->get_prompt('LASTNM')); ?></td>
	</tr>  
	<tr>
		<td><input type="text" name="fname" size="10" maxlength="40" value="<?php echo ($TT_user->first_name); ?>" /></td>
		<td><input type="text" name="mname" size="10" maxlength="20" value="<?php echo ($TT_user->middle_name); ?>" /></td>
		<td><input type="text" name="lname" size="10" maxlength="40" value="<?php echo ($TT_user->last_name); ?>" /></td>
	</tr>  

	<tr>
		<td colspan="3"><?php echo ($TT_workspace->get_prompt('EMAIL')); ?></td>
	</tr>  
	<tr>
		<td colspan="3"><input type="text" name="email" size="20" value="<?php echo ($TT_user->email); ?>" /></td>
	</tr>  

	<tr>
		<td colspan="3"><?php echo ($TT_workspace->get_prompt('URL')); ?></td>
	</tr>  
	<tr>
		<td colspan="3"><input type="text" name="homepage" size="20" value="<?php echo ($TT_user->url); ?>" /></td>
	</tr>  
	<tr>
		<td colspan="3">&nbsp;</td>
	</tr>

	<tr>
		<td><?php echo ($TT_workspace->get_prompt('ADDR1')); ?></td>
		<td><?php echo ($TT_workspace->get_prompt('ADDR2')); ?></td>
		<td><?php echo ($TT_workspace->get_prompt('CITY')); ?></td>
	</tr>  
	<tr>
		<td><input type="text" name="addr1" size="10" maxlength="40" value="<?php echo ($TT_user->address_1); ?>" /></td>
		<td><input type="text" name="addr2" size="10" maxlength="40" value="<?php echo ($TT_user->address_2); ?>" /></td>
		<td><input type="text" name="city" size="10" maxlength="40" value="<?php echo ($TT_user->city); ?>" /></td>
	</tr>  
	<tr>
		<td><?php echo ($TT_workspace->get_prompt('ZIP')); ?></td>
		<td><?php echo ($TT_workspace->get_prompt('STATE')); ?></td>
		<td><?php echo ($TT_workspace->get_prompt('COUNTRY')); ?></td>
	</tr>  
	<tr>
		<td><input type="text" name="zip" size="6" maxlength="10" value="<?php echo ($TT_user->zip); ?>" /></td>
		<td><input type="text" name="state" size="6" maxlength="10" value="<?php echo ($TT_user->state); ?>" /></td>
		<td><input type="text" name="country" size="10" maxlength="40" value="<?php echo ($TT_user->country); ?>" /></td>
	</tr>  
	<tr>
		<td colspan="3">&nbsp;</td>
	</tr>

	<tr>
		<td><?php echo ($TT_workspace->get_prompt('PHONEHOM')); ?></td>
		<td><?php echo ($TT_workspace->get_prompt('PHONEWRK')); ?></td>
		<td><?php echo ($TT_workspace->get_prompt('PHONEMOB')); ?></td>
	</tr>  
	<tr>
		<td><input type="text" name="hphone" size="8" maxlength="25" value="<?php echo ($TT_user->phone_home); ?>" /></td>
		<td><input type="text" name="wphone" size="8" maxlength="25" value="<?php echo ($TT_user->phone_work); ?>" /></td>
		<td><input type="text" name="mphone" size="8" maxlength="25" value="<?php echo ($TT_user->phone_mobile); ?>" /></td>
	</tr>  

	<tr>
		<td><?php echo ($TT_workspace->get_prompt('FAX')); ?></td>
		<td colspan="2">&nbsp;</td>
	</tr>  
	<tr>
		<td><input type="text" name="fax" size="8" maxlength="25" value="<?php echo ($TT_user->fax); ?>" /></td>
		<td colspan="2">&nbsp;</td>
	</tr>  
	<tr>
		<td colspan="3">&nbsp;</td>
	</tr>

	<tr>
		<td colspan="2"><?php echo ($TT_workspace->get_prompt('DTOFBRTH')); ?></td>
	</tr>  
	<tr>
		<?php
			list ($__year, $__month, $__day) = explode ('-', $TT_user->birthdate);
		?>
		<td colspan="3"><input type="text" name="dobday" size="2" maxlength="2" value="<?php echo ($__day); ?>" />
			<select name="dobmonth">
				<?php echo (TT_month_options($__month)); ?>
			</select>
			<input type="text" name="dobyear" size="4" maxlength="4" value="<?php echo ($__year); ?>" /></td>
	</tr>  
	<tr>
		<td colspan="3">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="3" align="center"><?php echo (TT_form_close ($TT_workspace->get_prompt('SAVE'))); ?></td>
	</tr>
  </tbody>
</table>
<input type="hidden" name="TTform_action" value="save_userinf" />
</form>

<?php
echo (TT_footer());
?>
Return current item: Terra-Terra, A Virtual Operating System