<?php
/****m*
* NAME
* TTchangepwd.php --- Workarea of the TT User application
*
* DESCRIPTION
* Area that is displayed when the user logs in and his/her
* password is expired.
*
* USAGE
* This page can *not* to be displayed as an embedded area
*
* 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: TTchangepwd.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());
$__canclose = False;
if ($TT['env_vars']['TTform_action'] == 'change_passwd') {
if ($TT_user->status == TT_OK) {
$__text =& new Text ('PWDCHANGED', $ThisArea);
$__text->show();
$__canclose = True;
} else {
TT_signal($TT_user);
}
} else {
$__text =& new Text ('PWDCHANGE', $ThisArea);
$__text->show();
}
if ($__canclose) {
echo ('<form><div align="center"><input type="button" value="' . $TT_workspace->get_prompt('CLOSEWA') . '" ' . "onClick=\"parent.WAVisibility('" . $ThisArea->id . "','c');\"></div></form>" . "\n");
} else {
echo ('<form action="' . $TT['env_server']['PHP_SELF'] . '" method="POST">' . "\n");
echo ('<table align="center">' . "\n");
echo (' <tbody>' . "\n");
echo (' <tr>' . "\n");
echo (' <td colspan="2"><h3>' . $TT_workspace->get_prompt('CHPWD') . '</h3></td>' . "\n");
echo (' </tr>' . "\n");
echo (' <tr>' . "\n");
echo (' <td>' . $TT_workspace->get_prompt('NEWPWD') . '</td>' . "\n");
echo (' <td><input type="password" name="npass1" size="10" maxlength="16" /></td>' . "\n");
echo (' </tr> ' . "\n");
echo (' <tr>' . "\n");
echo (' <td>' . $TT_workspace->get_prompt('VERPWD') . '</td>' . "\n");
echo (' <td><input type="password" name="npass2" size="10" maxlength="16" /></td>' . "\n");
echo (' </tr> ' . "\n");
echo (' <tr>' . "\n");
echo (' <td colspan="2"> </td>' . "\n");
echo (' </tr>' . "\n");
echo (' <tr>' . "\n");
echo (' <td colspan="2" align="center">' . TT_form_close ($TT_workspace->get_prompt('SAVE')) . '</td>' . "\n");
echo (' </tr>' . "\n");
echo (' </tbody>' . "\n");
echo ('</table>' . "\n");
echo ('<input type="hidden" name="TTform_action" value="change_passwd" />' . "\n");
echo (TT_applicname_field ());
echo ('</form>' . "\n");
}
echo (TT_footer());
?>