<?php
include("../includes/db.inc.php");
include("../includes/config.php");
$msql=new SHARP_SQL;
if(!isset($ADMINUSER) || !isset($ADMINPASS) || $if=="1"){
$msql->query("select star from admin where user='$user' and password='$password'");
if($msql->next_record()){
$star=$msql->f('star');
SetCookie("ADMINSTAR", "$star"); 
SetCookie("ADMINUSER", "$user"); 
SetCookie("ADMINPASS", "$password"); 
}else{
sendback('對不起,沒有權限');
}
}

if(isset($ADMINUSER) && isset($ADMINPASS)){
$msql->query("select star from admin where user='$ADMINUSER' and password='$ADMINPASS'");
if($msql->next_record()){
$star=$msql->f('star');
SetCookie("ADMINSTAR", "$star"); 
}else{
Header("location:index.php3");
}
}
?>
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>後台客戶管理系統</title>

</head>

  <frameset cols="*" rows="24,*"  border="0" framespacing="0"> 

    <frame name=fleft src="left.php3" scrolling=no>
   
   	 <frame name=fright src="guanli.htm" scrolling=auto>
        
  
  </frameset>

<noframes><body bgcolor="#FFFFFF">

</body></noframes>
</html>
