<?php
@session_start();
include('inc/conn.php');
include('checkstate.php');
include('inc/function.php');
include('fun/funcount.php');
if($_SESSION['etwcustomer']==''){
echo "<script type=\"text/javascript\">window.location.href=\"index.php\";</script>";
}
else
{
$id=sql_select("select userid,company from etw_user where username='".$_SESSION['etwcustomer']."'");
$sql="select * from etw_user where userid='".$_SESSION['guestid']."'";
$result=mysql_query($sql);
$info=mysql_num_rows($result);

 ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex,nofllow">
<title><?php echo $id[0][1]; ?> - 密码保护- ETW国际客服系统 </title>
<link rel="stylesheet" type="text/css" href="css/css.css" />

</head>

<body>
<div id="main">
    <div id="top">
       <div id="box">
           <div id="mail">用户名：<input type="text" name="emailname" size="20" /> 
           邮箱 <select name="emails">
                       <option value="gmail.com">Gmail</option>
                       <option value="yahoo.com">Yahoo</option>
                       <option value="163.com">163</option>
           </select>
           密码：<input type="password" name="emailpwd" size="20" />  <input type="submit" value="登陆" name="submit" />
           </div>
           <div id="wel">欢迎光临, <?php echo $_SESSION['etwcustomer'] ; ?> 修改密码 退出系统</div>
       </div>
       <div id="logo">
       <div id="menu">
          <ul><li class="current"><a href="manage.php">系统首页</a></li>
         <li><a href="news.php">新闻</a></li>
          <li><a href="commontools.php">工具箱</a></li>
       </ul><iframe style=" float:right;" width='350' height='30' marginwidth='0' marginheight='0' hspace='0' vspace='0' frameborder='0' scrolling='No' src='http://m.weather.com.cn/m/p3/weather1.htm' name="I6"></iframe></div>
       </div>
  </div>
     <!-- left -->
     <?php include('left.php');?>
     
     <div id="right">
          <p class="title"><strong>修改密码 >> 密码保护</strong> </p>       
        <div id="ques">
          <form action="submitbaohu.php?action=baohu" method="post" onsubmit="return checknull();">
            <input type="hidden" name="userid" value="<?php echo $_SESSION['guestid'] ?>" />
<p><br />1. 请选择问题 <select id="question" name="question"><option value="">请选择一个问题</option>
<?php  $sql="select * from etw_question";  $result=mysql_query($sql); while($row=mysql_fetch_array($result)){ ?>
<option value="<?php echo $row[id] ?>"><?php echo $row[question] ?></option><?php }  ?></select>
         <input id="answer" type="text" name="answer" size="25" /></p>
         <p>2. <input id="define" type="text" name="definequestion" value="请自定义一个问题"  onfocus="foucuses()"/> &nbsp; &nbsp; 
               <input id="definea" type="text" name="defineanswer" size="25" /></p>
         <p>3.请设置一个安全的邮箱地址, 它将用来接收取回密码的邮箱<br />
             &nbsp; &nbsp;  <input id="email" type="text" name="email" size="25" /></p>  
         <p style="padding-left:160px;"> <input type="submit" name="submit" value="提交保护信息" /></p> 
</form>   
        </div>

     </div>
<div id="footer"> Copy Rright &copy; 2008-2009 ETW International <?php if( @$_SESSION["username"]<>''){?>
<input type="hidden" id="onlineu" value="<?php echo $_SESSION["username"] ?>" />
<script type="text/javascript" src="js/onlinelisten.js"></script>
<script type="text/javascript">
window.setInterval(onlinemessage,30000);
</script>
<?php } ?></div> 
</div>
<script type="text/javascript" src="js/question.js"></script>
</body>
</html>
<?php }  ?>