<!-- #include file="include/onlogin.asp" -->
<!-- #INCLUDE file="include/jk_pagecute.asp" -->
<!--#include file="include/z_adv_conn.asp"-->
<%
'=========================================================
' File: z_adv_admin.asp
' Version:1.0
' Date: 2003-9-10
' Written by zhyj(fenglish@163.com)
'=========================================================
tit="<a href='z_ajk_admin.asp'>简单统计</a> ┋ " & _
    "<a href='?ajk_action=data'>参数设定</a> ┋ " & _
    "<a href='?ajk_action=explain'>说明及新版预览</a>"
response.write header(7,tit)
	        dim ajk_action 
		ajk_action=request("ajk_action")
		select case ajk_action
                case "data"
                call data()
                case "explain"
                call explain()
                case "save"
                call save()
                case else
                call main()
                end select
response.write ender()
	
sub main()
	set rs=server.createobject("adodb.recordset")
	sql="select * from [adv_config] where adv_type='默认'"
	rs.Open sql,conn_adv,1,3
	if rs.eof and rs.bof then
		rs.addnew
		rs("adv_type")="默认"
		rs("adv_url")="http://fxn.jahee.com/x/"
		rs("adv_txt")="『网页制作协会』"
		rs("adv_img")="http://fxn.jahee.com//logo/006.gif"
		rs("adv_cheat")=200
		rs("adv_wealth")=100
		rs("adv_ep")=20
		rs.update
	end if
	Response.Write "<table border=1 width=500 cellspacing=0 cellpadding=1 bordercolorlight=#C0C0C0 bordercolordark=#FFFFFF><tr>"
	Response.Write "<td colspan='2' align=center height=30><font color='#FF0000'>简 单 统 计</font></td></tr></table>"
	Response.Write "<table align=center border=1 width=500 cellspacing=0 cellpadding=1 bordercolorlight=#C0C0C0 bordercolordark=#FFFFFF><tr height=30><td class=tablebody1>总反馈量：</td><td class=tablebody1> "&rs("adv_click")&" 次</td><td class=tablebody1>有效反馈：</td><td class=tablebody1> "&rs("adv_click1")&" 次</td></tr></table><table border=1 width=500 cellspacing=0 cellpadding=1 bordercolorlight=#C0C0C0 bordercolordark=#FFFFFF><tr><td align=center>看来，有<font color='#FF0000'><b>"&rs("adv_click")-rs("adv_click1")&" </b></font>的反馈量你是不用付钱的，或者说，是客户乱点击的，无效。</td></tr></table>"
        rs.close
	set rs=nothing
end sub

sub data()
	set rs=server.createobject("adodb.recordset")
	sql="select * from [adv_config] where adv_type='默认'"
	rs.Open sql,conn_adv,1,3
	if rs.eof and rs.bof then
        rs.close
	set rs=nothing
        call main()
        end if	
	Response.Write "<br><br><table cellspacing=1 cellpadding=6 class=tableborder1 align=center ><form method='POST' action='?ajk_action=save'><tr>"
	Response.Write "<td colspan='2' align=center><font color='#FF0000'>参 数 设 定</font></td></tr>"
	Response.Write "<tr><td width=28%  align='right' class=tablebody1><b>广告内容</b>：</td><td class=tablebody1><input name='adv_url' type='text' size=50 value='"&rs("adv_url")&"'> * 请输入网址<br>即点击广告后，要打开的网页&nbsp;</td></tr>"
	Response.Write "<tr><td  align='right' class=tablebody1><b>文字广告</b>：</td><td class=tablebody1><input name='adv_txt' type='text' size=50 value='"&rs("adv_txt")&"'> * 请输入字符<br>即文字链接的内容&nbsp;</td></tr>"
	Response.Write "<tr><td  align='right' class=tablebody1><b>图片广告</b>：</td><td class=tablebody1><input name='adv_img' type='text' size=50 value='"&rs("adv_img")&"'> * 请输入个性图片的绝对地址<br><img src='"&rs("adv_img")&"' > <br>即发到别人网站上时显示的个性图片&nbsp;</td></tr>"
	Response.Write "<tr><td  align='right' class=tablebody1><b>防止作弊</b>：</td><td class=tablebody1><input name='adv_cheat' type='text' size=5 value='"&rs("adv_cheat")&"'> * 请输入同一IP点击有效的间隔秒数<br>即防止刷新，可限定同一IP点击的间隔&nbsp;</td></tr>"
	Response.Write "<tr><td  align='right' class=tablebody1>金钱/反馈点：</td><td class=tablebody1><input name='adv_wealth' type='text' size=5 value='"&rs("adv_wealth")&"'>  * 请输入数字</td></tr>"
	Response.Write "<tr><td  align='right' class=tablebody1>积分/反馈点：</td><td class=tablebody1><input name='adv_ep' type='text' size=5 value='"&rs("adv_ep")&"'>  * 请输入数字</td></tr>"
	Response.Write "<tr><td colspan='2' align='center' class=tablebody1>以上数据请规规矩矩的输入，该输数字的，就输数字，该输网址的，就输网址，否则，出错了，天皇老子也救不了你了。</td></tr>"
	Response.Write "<tr><td colspan='2' align='center' class=tablebody1><input type='submit' value='  确　定  '  name='cmdok' ></td></tr>"
	Response.Write "</font></table><br>"
	rs.close
	set rs=nothing
end sub

sub explain()	
	Response.Write "<table cellspacing=1 cellpadding=6 class=tableborder1 align=center><tr>"
	Response.Write "<td align=center><font color='#FF0000'>说明及新版预览</font></td></tr><br>"
	Response.Write "<br><tr><td class=tablebody1>"
	Response.Write "<br><br>插件名称：广告公司 1.0 for jk 6.6"
	Response.Write "<br><br>修改：hanehdy (http://www.sea521.com)"
	Response.Write "<br><br>下版待增加功能：1.广告客户分组，不同客户亨受不同待遇。<br>　　　　　　　　2.广告代码可自行增加，可有无限广告内容，不同用户各取所需。"
	Response.Write "<br><br>下下版待增加功能：开设广告代理商功能，给代理商更优惠待遇。"
	Response.Write "</table><br>"
end sub

sub save()
	if request.form("adv_url")="" or request.form("adv_txt")="" or request.form("adv_img")="" or  request.form("adv_cheat")="" or  request.form("adv_wealth")="" or  request.form("adv_ep")="" then
		Response.Write "<br><li>信息保存不够。有一栏或更多栏信息尚未填写。"
		exit sub
	end if
	
	set rs=server.createobject("adodb.recordset")
	sql="select * from [adv_config] where adv_type='默认'"
	rs.Open sql,conn_adv,1,3
	if rs.eof and rs.bof then
		rs.addnew
		rs("adv_type")="默认"
		rs("adv_url")=request.form("adv_url")
		rs("adv_txt")=request.form("adv_txt")
		rs("adv_img")=request.form("adv_img")
		rs("adv_cheat")=request.form("adv_cheat")
		rs("adv_wealth")=request.form("adv_wealth")
		rs("adv_ep")=request.form("adv_ep")
		rs.update
	else
		rs("adv_url")=request.form("adv_url")
		rs("adv_txt")=request.form("adv_txt")
		rs("adv_img")=request.form("adv_img")
		rs("adv_cheat")=request.form("adv_cheat")
		rs("adv_wealth")=request.form("adv_wealth")
		rs("adv_ep")=request.form("adv_ep")
		rs.update
	end if
	rs.close
	set rs=nothing
	
	Response.Write "<br><br>广告公司信息已经保存成功！<a href='z_ajk_admin.asp'> [请返回]</a>"
	exit sub
end sub
%>