コード例 #1
0
 */
include "inc/init.inc.php";
/* 
 * Defining the pages
 */
$pages = array("profile_password");
/* 
 * Controller routines
 */
$already_sent = $_POST["already_sent"];
$error_count = 0;
if ($already_sent == 1) {
    $passwd1 = $_POST["passwd1"];
    $passwd2 = $_POST["passwd2"];
    $passwd3 = $_POST["passwd3"];
    $res = UserCtl::SetUserPassword(SessionCtl::GetSession(), $passwd1, $passwd2, $passwd3);
    if ($res["status"] != "SUCCESS") {
        $error = $res["status"];
        $error_count++;
    }
}
/* 
 * Assignments to the engine
 */
$tpl->assign("content_pages", $pages);
$tpl->assign("userdata", $res);
$tpl->assign("error", $error);
$tpl->assign("error_count", $error_count);
$tpl->assign("already_sent", $already_sent);
/* 
 * Output of the page