Source for file PersonView.inc
Documentation is available at PersonView.inc
require_once $config->get('sysRoot'). 'alpha/model/PersonObject.inc';
require_once $config->get('sysRoot'). 'alpha/view/AlphaView.inc';
* The rendering class for the PersonObject class
* @author John Collins <dev@alphaframework.org>
* @version $Id: PersonView.inc 1341 2011-03-17 15:02:02Z johnc $
* @license http://www.opensource.org/licenses/bsd-license.php The BSD License
* @copyright Copyright (c) 2011, John Collins (founder of Alpha Framework).
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the
* following conditions are met:
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
* * Neither the name of the Alpha Framework nor the names
* of its contributors may be used to endorse or promote
* products derived from this software without specific
* prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* Method to render the login HTML form
$html = '<div class="bordered" style="text-align:center; padding:10px; margin:10px;">';
$html .= '<table cols="2" align="center">';
$stringBox = new StringBox(new String(isset ($_POST["email"])? $_POST["email"] : ''), $this->BO->getDataLabel('email'), 'email', 'loginForm', '50');
$html .= $stringBox->render(true);
$stringBox = new StringBox($password, $this->BO->getDataLabel('password'), 'password', 'loginForm', '50');
$html .= $stringBox->render(true);
$html .= '<tr><td colspan="2">';
$temp = new Button("submit","Login","loginBut");
$html .= '<div align="center">'. $temp->render(80). '</div>';
* Method to render the reset password HTML form
$html = '<p>If you have forgotten your password, you can use this form to have a new password automatically generated and sent to your e-mail address.</p>';
$html .= '<table cols="2">';
$html .= ' <td>E-mail Address</td> <td><input type="text" name="email" size="50" value="'. (isset ($_POST["email"])? $_POST["email"] : ''). '"/></td>';
$html .= '<tr><td colspan="2">';
$temp = new Button("submit","Reset Password","resetBut");
$html .= $temp->render();
$temp = new Button("document.location.replace('". $config->get('sysURL'). "')","Cancel","cancelBut");
$html .= $temp->render();
* Method to render the user registration form
$html = '<p>In order to access this site, you will need to create a user account. In order to do so, please provide a valid email address below and a password will be sent to your inbox shortly (you can change your password once you log in).</p>';
$html .= '<p class="warning">Please note: the forum is currently not available, but will be made available in the coming weeks!</p>';
$html .= '<table cols="2">';
$html .= '<form action="'. $_SERVER["PHP_SELF"]. '?reset=true" method="POST">';
$html .= ' <td>Forum name</td> <td><input type="text" name="displayname" size="50" value="'. (isset ($_POST["displayname"])? $_POST["displayname"] : ''). '"/></td>';
$html .= ' <td>E-mail Address</td> <td><input type="text" name="email" size="50" value="'. (isset ($_POST["email"])? $_POST["email"] : ''). '"/></td>';
$html .= '<tr><td colspan="2">';
$temp = new Button("submit","Register","registerBut");
$html .= $temp->render();
$temp = new Button("document.location.replace('". $config->get('sysURL'). "')","Cancel","cancelBut");
$html .= $temp->render();
|