<!--#include file="conn1.asp"-->
<!--#include file="session2.asp"-->
<%dim action
action=request.QueryString("action")
select case action
case "save"%>
<%

 if request.QueryString("action")="save" then
 
 



set rs=server.CreateObject("adodb.recordset")
rs.open "select * from dianpu where id="&request.QueryString("id"),conn,1,3

rs("mingzi")=trim(request("mingzi"))

rs("xxdz")=trim(request("xxdz"))



if trim(request.form("a"))="" then
rs("tupian")=trim(request.form("tupian1"))
else
rs("tupian")=trim(request.form("a"))
end if


rs("dianzhang")=trim(request.form("dianzhang"))

rs("dianhua")=trim(request.form("dianhua"))
rs("quyu")=trim(request.form("quyu"))
rs("qicq")=trim(request.form("qicq"))

rs.update
rs.close
set rs=nothing
session("content")=""
response.write "<script language=javascript>alert('修改成功！');window.location.href='fdadmin.asp';</script>"
response.End
end if
%>
<%case ""%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="skins/css/main.css" rel="stylesheet" type="text/css">
<script language="javascript">
<!--
function checkdata()
{





if (document.pic.mingzi.value=="")
	{
	  alert("对不起，请输入店名！")
	  document.pic.mingzi.focus()
	  return false
	 }

if (document.pic.xxdz.value=="")
	{
	  alert("对不起，请输入详细地址！")
	  document.pic.xxdz.focus()
	  return false
	 }


if (document.pic.dianzhang.value=="")
	{
	  alert("对不起，请输入经营店长！")
	  document.pic.dianzhang.focus()
	  return false
	 }






if (document.pic.dianhua.value=="")
	{
	  alert("对不起，请输入电话号码！")
	  document.pic.dianhua.focus()
	  return false
	 }




if (document.pic.quyu.value=="")
	{
	  alert("对不起，请选择区域！")
	  //document.pic.shouji.focus()
	  return false
	 }
	 
	 
if (document.pic.qicq.value=="")
	{
	  alert("对不起，请输入QQ号码！")
	  document.pic.qicq.focus()
	  return false
	 }
	 
	 
	 

}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>


  <%set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from dianpu where id="&request.QueryString("id")&"" ,conn,1,3%>

</head>
<body>
<form id="pic" name="pic"   method="post" action="editfendian.asp?action=save&id=<%=request.QueryString("id")%>" onSubmit="return checkdata()" >
  <table cellpadding="3" cellspacing="1" border="0" width="100%" class="tableBorder" align=center>
    <tr> 
      <th class="td_title"  colspan=6 height=25>修改分店</th>
    </tr>
	
	
	    <tr> 
      <td width="15%" class="td_content" align=right>店名：</td>
      <td width="91%" class="td_content">
	  <input name="mingzi" type="text" id="mingzi" value="<%=rs("mingzi")%>" size="25">	</td>
    </tr>
	
	    <tr> 
      <td width="15%" class="td_content" align=right>详细地址：</td>
      <td width="91%" class="td_content">
	  <input name="xxdz" type="text" id="xxdz" value="<%=rs("xxdz")%>" size="60">	</td>
    </tr>
	
	
    <tr> 
      <td width="15%" class="td_content" align=right>经营店长：</td>
      <td width="91%" class="td_content">
	  <input name="dianzhang" type="text" id="dianzhang" value="<%=rs("dianzhang")%>" size="25">	</td>
    </tr>
	
	
	
	  
	    <tr>
          <td width="15%"  align="right" valign="middle" height="30" class="td_content" >照&nbsp;&nbsp;片：</td>
          <td width="91%" align="left" valign="middle" class="td_content"><table width="628" border="0" cellspacing="0" cellpadding="0">
<tr>
      <td width="72%" align="left"><IFRAME name=ad src="/up4.htm" frameBorder=0 width="100%" scrolling=no height=30></IFRAME></td>
      <td width="28%" align="left" ><INPUT type="hidden" id=a title=可直接输入网上图片的地址，或由上传程序自动产生图片地址 style="WIDTH: 200px" value="" name=a  size="20"><INPUT id=f type="hidden" title=可直接输入网上图片的地址，或由上传程序自动产生图片地址 style="WIDTH: 200px" value="" name=f size="20"><span id="tupian" class="BlackS12"></span>        <img src="/<%=rs("tupian")%>" width="70" height="70" />  <input name="tupian1" type="hidden" id="tupian1" value="<%=rs("tupian")%>" /></td>
    </tr>
   </table></td>
        </tr>
	
	
	

	
	
  <tr> 
      <td  class="td_content"align=right>联系电话：</td>
      <td class="td_content"><input name="dianhua" type="text" id="dianhua" value="<%=rs("dianhua")%>" size="30">      </td>
    </tr>
		
	
	
    <tr> 
      <td  class="td_content"align=right>所属区域：</td>
      <td class="td_content"><select id="quyu" name="quyu" > 
        <option value="<%=rs("quyu")%>" selected="selected"><%=rs("quyu")%></option>
	<option value='蒸湘区'> 蒸湘区</option>
	  <option value='雁峰区'> 雁峰区</option>  
	  <option value='石鼓区'> 石鼓区</option> 
	  <option value='白沙洲'> 白沙洲</option> 
	   <option value='珠晖区'> 珠晖区</option>  <option value='南岳区'> 南岳区</option>  <option value='立新开发区'> 立新开发区</option>  <option value='华新开发区'> 华新开发区</option>    </select></td>
    </tr>
	
	
	    <tr> 
      <td  class="td_content"align=right>Q&nbsp;&nbsp;Q：</td>
      <td class="td_content"><input name="qicq" type="text" id="qicq" value="<%=rs("qicq")%>" size="30">      </td>
    </tr>
	

	
	
	
    <tr> 
      <td colspan="2" bgcolor="#EEF7FD"  align="center">
          <input class="button" type="submit" name="Submit" value="修改分店"  style="width:80px; height:25px;">      </td>
    </tr>
  </table>
</form>
<br>
<%end select%>
</body>
</html>
