<html xmlns="http://www.w3.org/1999/xhtml">
<!--#include file="../Inc/Conn.asp" -->
<!--#include file="../Inc/SK.Session.asp" -->
<!--#include file="../Inc/SK.Funtion.asp" -->
<%if Not (Getconfig("SK_Sales")="0" AND (Session("Manager")="1" OR (JudgePopedomTF(Session("UserName"),"SK300000000") AND JudgePopedomTF(Session("UserName"),"SK300000100")))) then Call ReturnError()%>
<%
if Not isnumeric(JCID(F("ID"))) then Call ReturnError10()
set rs=server.createobject("adodb.recordset")
sql="SELECT * from SK_Activity where AcID="&JCID(F("ID"))&""
rs.Open sql,conn,1,1
if rs.eof and rs.bof then Call ReturnError4()
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>查看市场活动</title>
<META http-equiv=Page-Enter content=SKCRM>
<META http-equiv=Page-Exit content=SKCRM>
<META content="MSHTML 6.00.3790.2858" name=GENERATOR>
<LINK href="../images/style.css" type=text/css rel=stylesheet>
<script language="javascript" src="../Inc/Check.js"></script>
<script language="javascript" src="../Inc/Calendar.js"></script>
<script language="javascript" src="../Inc/jquery.js"></script>
<SCRIPT language=javascript src="../inc/Openwin.js"></SCRIPT>
<style type="text/css">
<!--
body {
margin: 5px 0px 5px 0px;
overflow-x: hidden;
}
-->
</style>
</head>
<body>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<TBODY>
<tr>
<td class="SK_Td_Top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12" height="25"><img src="../images/tab_03.gif" width="12" height="25" /></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="46%" valign="middle">查看市场活动信息</td>
<td width="54%"></td>
</tr>
</table></td>
<td width="16"><img src="../images/tab_07.gif" width="16" height="25" /></td>
</tr>
</table></td>
</tr>
<tr>
<td>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="8" background="../images/tab_12.gif"></td>
<td>

<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="b5d6e6">
<tr>
  <td width="12%" class="SK_Text2">活动类别</td>
  <td width="44%" class="SK_Text1"><%
set RsClass=server.createobject("adodb.recordset")
SqlClass="select * from SK_SystemCategory where SK_Di=41 and CategoryID="&RS("SK_Di")&""
RsClass.open SqlClass,conn,1,1
Response.write""&RsClass("SK_Name")&""
RsClass.close
Set RsClass=Nothing
%></td>
  <td width="12%" class="SK_Text2">活动主题</td>
  <td width="32%" class="SK_Text1"><%=Rs("SK_Title")%></td>
</tr>
<tr>
  <td class="SK_Text2">负责人员</td>
  <td class="SK_Text1"><%=Rs("SK_Principal")%></td>
  <td class="SK_Text2">经办人员</td>
  <td class="SK_Text1"><%=Rs("SK_Agent")%></td>
</tr>

<tr>
  <td class="SK_Text2">开始日期</td>
  <td class="SK_Text1"><%=Rs("SK_Atime")%></td>
  <td class="SK_Text2">结束日期</td>
  <td class="SK_Text1"><%=Rs("SK_Btime")%></td>
</tr>
<tr>
  <td class="SK_Text2">发布时间</td>
  <td class="SK_Text1"><%=Rs("SK_Time")%></td>
  <td class="SK_Text2">发布人员</td>
  <td class="SK_Text1"><%
set RsSales=server.createobject("adodb.recordset")
SqlSales="select * from SK_SystemUsers where UsersID="&RS("SK_SalesID")&""
RsSales.open SqlSales,conn,1,1
Response.write""&RsSales("SK_OName")&""
RsSales.close
Set RsSales=Nothing
%></td>
</tr>


<tr>
  <td valign="top" class="SK_Text2">活动内容</td>
  <td colspan="3" valign="top" class="SK_FContent"><%=Rs("SK_Content")%></td>
</tr>
<%
'自定义选项开始
set RsOptions=server.createobject("adodb.recordset")
sqlOptions="SELECT * from SK_SalesOptions where SK_Di=0 and SK_ShowOnForm=0 Order by SK_OrderID asc"
RsOptions.Open sqlOptions,conn,1,1
if RsOptions.bof and RsOptions.eof then
else
%>
<tr>
  <td colspan="4" class="SK_Title1">自定义选项</td>
</tr>
<tr>
  <td colspan="4" class="SK_Text1">
<%
Response.write"<table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""1"">"
for Optionsi=1 to RsOptions.recordCount '变量i从1循环到数据库中的全部记录数 
if (Optionsi mod 2 =1) then '每个tr即每行显示1个记录,可根据需要自行修改, 将左边的1修改为2即显示两行。
response.write "<tr>" 
end if
Response.write"<td class=""SK_Text2"" width=""12%"">"&RsOptions("SK_Title")&"</td><td class=""SK_Text1"">"

Set rs1=Server.CreateObject("ADODB.RecordSet") 
sql1="SELECT * from SK_SalesOptionsDetail where SK_OptionsID="&RsOptions("FieldID")&" and OptionsDetailID="&rs(""&RsOptions("SK_FieldName")&"")&"" 
rs1.Open sql1,conn,1,1
Response.write""&rs1("SK_OName")&""
rs1.close
set rs1=Nothing

Response.write"</td>"
if (Optionsi mod 2 = 0) then '每个tr即每行显示1个记录,可根据需要自行修改, 将左边的1修改为2即显示两行。
response.write "</tr>" 
end if 
RsOptions.movenext 
next 
Response.write"</table>"
%>
</td>
</tr>
<%
end if
RsOptions.close
set RsOptions=Nothing
'自定义选项结束
'自定义字段开始
set RsFields=server.createobject("adodb.recordset")
sqlFields="SELECT * from SK_SalesFields where SK_Di=0 and SK_ShowOnForm=0 Order by SK_OrderID asc"
RsFields.Open sqlFields,conn,1,1
if RsFields.bof and RsFields.eof then
else
%>  
<tr>
  <td colspan="4" class="SK_Title1">自定义字段</td>
</tr>
<tr>
  <td colspan="4" class="SK_Text1">
<%
Response.write"<table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""1"">"
for Fieldsi=1 to RsFields.recordCount '变量i从1循环到数据库中的全部记录数 
if (Fieldsi mod 2 =1) then '每个tr即每行显示1个记录,可根据需要自行修改, 将左边的1修改为2即显示两行。
response.write "<tr>" 
end if
Response.write"<td class=""SK_Text2"" width=""12%"">"&RsFields("SK_Title")&"</td><td class=""SK_Text1"">"&Rs(""&RsFields("SK_FieldName")&"")&"</td>"
if (Fieldsi mod 2 = 0) then '每个tr即每行显示1个记录,可根据需要自行修改, 将左边的1修改为2即显示两行。
response.write "</tr>" 
end if 
RsFields.movenext
next 
Response.write"</table>"
%>
</td>
</tr>
<%
end if
RsFields.close
set RsFields=Nothing
'自定义字段结束
%>
<tr>
<td colspan="4" class="SK_Text">
<input type="button" value=" 关闭 " onClick="window.opener.location.reload();window.close();" class="button1" /></td>
</tr>
</table>

</td>
<td width="8" background="../images/tab_15.gif"></td>
</tr>
</table></td>
</tr>
<tr>
<td class="SK_Td_Foot">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1%" height="20"><img src="../images/tab_18.gif" width="12" height="20" /></td>
<td width="98%" class="SK_Td_Page"></td>
<td width="1%"><img src="../images/tab_20.gif" width="16" height="20" /></td>
</tr>
</table>

</td>
</tr>
</TBODY>
</table>
</body>
<%
Call CloseDB()
%>
</html>