session_start(); if(isset($_POST['inputid']) && isset($_POST['inputpass'])) { include "config.php"; $pwend=substr($_POST['inputpass'], 6, 1); $output; $ret; $sc=';'; $xx='PWENC2'.$sc.$_POST['inputid'].$sc.$_POST['inputpass'].$sc; $xx='"'.$xx.'"'; $ex = iconv("UTF-8","EUC-KR",$xx); exec("A0.exe $ex", $output, $ret); $PwN = $output[0]; if ($PwN == "1,OK"){ if ($pwend == ")"){ $_SESSION['login_id']=$_POST['inputid']; $host = $_SERVER['HTTP_HOST']; $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); $stpw = "/restpw.html"; header("location: http://$host$uri$stpw"); exit; } else{ $_SESSION['login_id']=$_POST['inputid']; $host = $_SERVER['HTTP_HOST']; $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); header("location: http://$host$uri"); exit; } } else { if ($PwN == "-3,ERR"){ echo ""; } else if ($PwN == "0,NO"){ echo ""; } else if ($PwN == "-1,NO"){ echo ""; } else{ echo ""; } } } ?>