Location: PHPKode > projects > IChair > ichair_release8/admin/manage_users_password_result.php
<?php

/*
 * Copyright (C) 2006, 2007 Thomas Baigneres, Matthieu Finiasz
 *
 * This file is part of iChair.
 *
 * iChair is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 3 of the License, or (at your
 * option) any later version.
 * 
 * iChair 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 General Public License
 * for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 */

?><?
$page_title = "Generate and E-mail Password";
include '../utils/tools.php';
include "header.php";

$reviewer = Reviewer::getByReviewerNumber(Tools::readPost('reviewerNumber'));

if(!is_null($reviewer)) {

  if($reviewer->generateAndEmailPassword()) {
    Log::logGeneratePassword($reviewer);
    ?>
    <div class="OKmessage">
      The mail containing the password for user <? Tools::printHTML($reviewer->getLogin()); ?> has been successfully sent to <? Tools::printHTML($reviewer->getEmail()); ?>.
    </div> 
    <form action="manage_users.php" method="post">
      <div class="floatRight">
        <input type="submit" class="buttonLink bigButton" value="Ok" />
      </div>
    </form>
    <?
    }
    else {
    ?>
    <div class="ERRmessage">
      The mail containing the password for user <? Tools::printHTML($reviewer->getLogin()); ?> could not be sent to <? Tools::printHTML($reviewer->getEmail()); ?>.
    </div> 
    <form action="manage_users.php" method="post">
      <div class="floatRight">
        <input type="submit" class="buttonLink bigButton" value="Ok" />
      </div>
    </form>
    <?    
    }
}
?>
</body>
</html>
Return current item: IChair