欢迎光临
我们一直在努力

动易添加在线报名 适用于sw6.8等各版本

修改自:http://www.cnblogs.com/tangge/archive/2011/06/17/2083595.html 动易SW早就停止开发了,不过以前做起来还比较熟悉,相对比较容易上手,朋友要做网站,正好翻出来再用用,动易功能还是比较完美的。

1、进入后台,添加自定义页面:

[code]{$PageTitle}{$MY_IndexMeta}
{$MY_ContentMeta(Article)}
{$Skin_CSS} {$MenuJS}<script type="text/javascript" src="{$InstallDir}jS/prototype.js"></script><script type="text/javascript" language="JavaScript">// <![CDATA[
//改变图片大小
function resizepic(thispic)
{
if(thispic.width>700){thispic.height=thispic.height*700/thispic.width;thispic.width=700;}
}
//无级缩放图片大小
function bbimg(o)
{
return true;
}

//双击鼠标滚动屏幕的代码
var currentpos,timer;
function initialize()
{
timer=setInterval ("scrollwindow ()",30);
}
function sc()
{
clearInterval(timer);
}
function scrollwindow()
{
currentpos=document.body.scrollTop;
window.scroll(0,++currentpos);
if (currentpos !=document.body.scrollTop)
sc();
}
document.onmousedown=sc
document.ondblclick=initialize

//更改字体大小
var status0=”;
var curfontsize=10;
var curlineheight=18;
function fontZoomA(){
if(curfontsize>8){
document.getElementById(‘fontzoom’).style.fontSize=(–curfontsize)+’pt’;
document.getElementById(‘fontzoom’).style.lineHeight=(–curlineheight)+’pt’;
}
}
function fontZoomB(){
if(curfontsize<64){
document.getElementById(‘fontzoom’).style.fontSize=(++curfontsize)+’pt’;
document.getElementById(‘fontzoom’).style.lineHeight=(++curlineheight)+’pt’;
}
}
// ]]></script>
{$MY_本站头部}</pre>
<table width="1000" border="0" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td height="32"><img src="{$InstallDir}Skin/qingchunzhongxueA/jiantou026.gif" alt="" align="absMiddle" border="0" />{$ShowPath}</td>
</tr>
<tr>
<td height="8"> </td>
</tr>
</tbody>
</table>
<table width="1000" border="0" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td class="biankuan_hui4 bg_bodytop" valign="top" height="250">
<table width="94%" border="0" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td class="title_hei18" align="middle" height="80">在线报名</td>
</tr>
<tr>
<td align="middle" height="5"> </td>
</tr>
<tr>
<td align="middle" height="30"> </td>
</tr>
<tr>
<td height="5"> </td>
</tr>
<tr>
<td height="35"> </td>
</tr>
<tr>
<td valign="top" height="450"><center>
<table width="431" border="0">
<tbody>
<tr>
<td width="281"><form action="SaveBm.asp" method="post">
<div class="online_cf_l1">
<p class="ulr"> </p>

<ul class="ul_title">基本信息</ul>
<ul class="ul_sel">
<li>学生姓名: <input id="StudentName" class="input_130" type="text" name="StudentName" /> <span class="red">*</span></li>
<li>学生年级: <input id="StudentClass" class="input_130" type="text" name="StudentClass" /> <span class="red">*</span></li>
</ul>
</div>
<div class="online_cf_l2">
<div class="ul_title">联系信息</div>
<ul class="ul_sel">
<li>家长姓名: <input id="ParentsName" class="input_130" type="text" name="ParentsName" /> <span class="red">*</span></li>
<li>电话号码: <input id="Tel" class="input_130" type="text" name="Tel" /> <span class="red">*</span></li>
<li>电子邮件: <input id="Mail" class="input_130" type="text" name="Mail" /></li>
<li class="height100 inde_65">其他说明:<textarea id="Content" class="textarea_370" name="Content" rows="4">[/textarea] </textarea></li>
</ul>
<table width="200" border="0" align="center">
<tbody>
<tr>
<td><span class="but"><input class="submit_sub" onmouseout="this.className=’submit_sub’" type="submit" value="提交" /> </span></td>
</tr>
</tbody>
</table>
&nbsp;

</div>
</form></td>
</tr>
</tbody>
</table>
{$Vote}</center>&nbsp;

&nbsp;</td>
</tr>
<tr>
<td height="2"> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td height="2"> </td>
</tr>
<tr>
<td height="20"> </td>
</tr>
</tbody>
</table>
<table style="word-break: break-all;" width="94%" border="0" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td height="10"> </td>
</tr>
</tbody>
</table>
&nbsp;</td>
</tr>
</tbody>
</table>
<pre>{$MY_本站底部}</pre>
<noscript></noscript>
<pre>

[/code]

我是加了页头和页尾标签调用,否则光一个报名多难看。添加完成后会得到一个ShowPage.asp?id=数字的连接,这就是你前台调用的。 

 2、保存页面,放在网站根目录下:

[code]
<!–#include file="Start.asp"–>alert(""请输入学生姓名!"");history.back(-1);"
End If
If len(ParentsName) < 2 Then
response.write "<script type="text/javascript">// <![CDATA[
alert(""请输入家长姓名!"");history.back(-1);
// ]]></script>"
End If
If len(Tel) < 8 Then
response.write "<script type="text/javascript">// <![CDATA[
alert(""请正确输入电话号码!"");history.back(-1);
// ]]></script>"
End If
exec="insert into PE_Zxbm(StudentName,StudentClass,ParentsName,Tel,Mail,Content,Addtime)values

(‘"+StudentName+"’,’"+StudentClass+"’,’"+ParentsName+"’,’"+Tel+"’,’"+Mail+"’,’"+Content+"’,now())"
conn.execute exec
conn.close
set conn=nothing
response.write "<script type="text/javascript">// <![CDATA[
alert(""报名成功!"");location.replace(‘index.asp’);
// ]]></script>"
%>

[/code]

原作者没有加入时间标签,所以在前台提交的没有时间,我这里加上了报名时间的显示,最后一句,提交成功后应该返回首页吧,再回到报名页面没意义了,所以我也修改了下。

3、添加后台管理菜单的链接

文件在admin/Admin_Index_Left.asp

4、添加Admin_Zxbm.asp,Admin_Zxbm_xz.asp,DelContent.Asp对在线报名进行管理的页面

 5、对数据库进行修改

添加表名:PE_Zxbm id 自动编号 StudentName 文本 StudentClass 文本 ParentsName 文本 Tel 文本 Mail 文本 Content 文本 Addtime 日期/时间

作者网站的代码复制功能太不给力了,有的能复制,有的连数字编号一起复制下来,数字编号还得一个一个来删除,所以我把文件打了个包供下载,给后人省力。 老规矩,先点广告,再注册下载。动易在线报名

赞(0) 打赏
未经允许不得转载:刘旭的人个博客 » 动易添加在线报名 适用于sw6.8等各版本
分享到: 更多 (0)
标签:

评论 2

评论前必须登录!

 

  1. #1
    凤栖梧
    凤栖梧12年前 (2012-05-28)
  2. #2
    ynher
    ynher12年前 (2012-08-05)

QQ :13945502电话:13913571631

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

×
订阅图标按钮