FrontPage
login.phpのソースコード
<?php
require("MySmarty.class.php");
require('Settings.class.php');
$smarty = new MySmarty();
$login = new Settings;
$id = $_POST["id"];
$pass = $_POST["pw"];
$smarty->assign('title', 'WAVE blog ログイン');
$smarty->assign('error', '');
$smarty->assign('id', $id);
$smarty->assign('passwd',$pass);
//ログイン不成功・成功
if( ( $id != '' ) && ( $login->isValidUser ($id,$pass) ) ){
session_start();
$_SESSION["user"]=$id;
$_SESSION['id'] = $id;
$_SESSION['pass'] = $pass;
header("Location: admin.php" );
exit;
}else{
$smarty->assign('error', $login->errorm);
$smarty->display('login.tpl');
}
?>