澳门新葡亰娱乐官网一个简易需要注册的留言版程序

1.guestbook.php html head script language=JavaScript !– !– var
hellotext=为了你的顶级浏览效果请您使用IE4.0以上的版本和800*600分辨率
var thetext= var started=false var step=0 var times=1 function
welcometext() { times– if (times==0) { if (started==false) { started =
true; window.status = hellotext; setTimeout(anim(),1); } thetext =
hellotext; } } function showstatustext(txt) { thetext = txt;
setTimeout(welcometext(),4000) times++ } function anim() { step++ if
(step==7) {step=1} if (step==1) {window.status=’===’+thetext+’===’} if
(step==2) {window.status=’===’+thetext+’===’} if (step==3)
{window.status=’==’+thetext+’==’} if (step==4)
{window.status=’==’+thetext+’==’} if (step==5)
{window.status=’===’+thetext+’===’} if (step==6)
{window.status=’===’+thetext+’===’} setTimeout(anim(),200); } // —
welcometext(); function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+.location=’+selObj.options[selObj.selectedIndex].value+’卡塔尔;
if (restore卡塔尔国 selObj.selectedIndex=0; } //– /script
title天地网络留言版/title meta content=text/html; charset=gb2312 /head
style type=text/css !– a:link {font-size: 9pt; color: #FFFFFF} —
/style body ? $PAGESIZE=5; $db=mysql_connect(localhost,root,);
mysql_select_db(lyanban,$db); $result=mysql_query(SELECT * FROM
message order by date desc,$db); $rowcount=mysql_num_rows($resultState of Qatar;
$PAGES=CEIL($rowcount/$PAGESIZE卡塔尔(قطر‎; if($rowcount==0卡塔尔国 {echo 近期不曾留言!a
href=guestbook.htm应接您留言!/a;} if($rownum == State of Qatar { $rownum = 1; }
$AA=CEIL($rownum/5卡塔尔(قطر‎; $i=0 ; echo TABLE WIDTH=100%tddiv font size=2
color=#000000B共有留言:$rowcount 条共:$PAGES 页right以后是第 $AA
页/right/B/font/div/td; echo hr size=1 color=#ccccffwidth=75%; while
($myrow=mysql_fetch_array($result)){ $i++;
if(($i=$rownum)&&($i$rownum+5)){ echo table width=75% border=1
cellspacing=0 cellpadding=0 bordercolordark=#FFFFFF
bordercolorlight=#000000 background=15.JPG; echo trtd width=15%div font
size=2 color=#FFFFFF姓 名/font/div/tdtd width=85%font size=2
color=#FFFFFF$myrow[username]/font/td/tr; echo trtd width=15%div font
size=2 color=#FFFFFF电子信箱/font/div/tdtd width=85%font size=2
color=#FFFFFFa href=mailto:$myrow[email]$myrow[email]/font/a/td/tr;
echo trtd width=15%div font size=2 color=#FFFFFF公司主页/font/div/tdtd
width=85%font size=2 color=#FFFFFFa href=$myrow[homepage]
target=_blank$myrow[homepage]/font/a/td/tr; echo trtd width=15%div
font size=2 color=#FFFFFF留言核心/font/div/tdtd width=85%font size=2
color=#FFFFFF$myrow[topic]/font/td/tr; echo trtd width=15%div font
size=2 color=#FFFFFF留言内容/font/div/tdtd width=85%font size=2
color=#FFFFFF$myrow[content]/font/td/tr; echo trtd width=15%div font
size=2 color=#FFFFFF留言时间/font/div/tdtd width=85%font size=2
color=#FFFFFF$myrow[date]/font/td/tr; echo /tablehr size=1
color=#ccccffwidth=75%;} } echo table width=100%trtd width=87%;
#看清是不是有或 echo form name=hiddenform method=post
action=guestbook.php; echo div input type=hidden name=rownum value=;
echo input type=hidden name=rowcount value=$rowcount; #显示 if
($rownum=5) echo input type=submit value=
onclick=document.hiddenform.rownum.value=.($rownum-5).; #显示 if
($rownum+5=$rowcount) { echo input type=submit value=
onclick=document.hiddenform.rownum.value=.($rownum+5)./div; } echo
/form; echo /td; echo /tr; echo /table; echo table width=100% trtddiv
font color=#ffffff size=2a
href=guestbook.htm再次来到继续发言/a/font/div/td/tr/table; ? /body /html
2.show.php3 ? $username = htmlspecialchars(ltrim(stripslashes
(trim($name卡塔尔卡塔尔国State of Qatar卡塔尔国;//本函式可去掉字串中的反斜线空格字元 $email =
htmlspecialchars(ltrim(stripslashes (trim($emailState of Qatar卡塔尔(قطر‎卡塔尔国卡塔尔(قطر‎; $homepage =
htmlspecialchars(ltrim(stripslashes (trim($homepage卡塔尔国State of Qatar卡塔尔国State of Qatar; $topic =
htmlspecialchars(ltrim(stripslashes (trim($topicState of QatarState of Qatar卡塔尔(قطر‎卡塔尔国; $content =
htmlspecialchars(ltrim(stripslashes (trim($content卡塔尔State of Qatar卡塔尔国卡塔尔国; //
$content=base64_encode($contentState of Qatar; //send email //if ($ok卡塔尔(قطر‎mail($email,$topic,$contentState of Qatar; if
(($username==卡塔尔(قطر‎or($topic==卡塔尔国or(strlen($usernameState of Qatar20卡塔尔国or(strlen($topic卡塔尔20卡塔尔(قطر‎卡塔尔(قطر‎{echo 请填入要求的门类或着违法客商名!a
href=javascript:history.go(-1卡塔尔(قطر‎;再次来到/a; } //wrong email ? elseif
(($email!=)and(!eregi(^[_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,3}$,$email卡塔尔国卡塔尔卡塔尔国{ echo 请你填写准确的 E-Mail 地址/pp a
href=javascript:history.go(-1卡塔尔(قطر‎;重返/a; } //wrong homepage ? elseif
(($homepage!=)and(!eregi(()+[0-9a-z-]+.([0-9a-z-]+.)+[a-z]{2,3}$,$homepage卡塔尔卡塔尔卡塔尔国{echo 主页地址输入错误!a href=javascript:history.go(-1卡塔尔;再次回到/a;} else{
//联接数据库 mysql_connect(localhost,root,);
mysql_select_db(lyanban); $sql=select password from tb where
username=’$username’; $result=mysql_query($sql);
$nums=mysql_num_rows($result); if($nums!=1卡塔尔国{ echo对不起!请先a
href=register.html注册/a!; } else{ //获得日期 YYYY-MM-DD HH:MM:SS
2001-01-01 00:00:00′ $t = date(Y.-.m.-.d. .H.:.i.:.s卡塔尔国;
//将新客户插入数据库 mysql_query(insert into message values
(‘$username’,’$email’,’$homepage’,’$topic’,’$content’,’$t’)); echo div
font size=2 color=#000000谢谢您留言!您的留言已成功步入,a
href=guestbook.php再次来到/a/font/div; } } ? 3.zhuc.php(注册程序卡塔尔 ?
mysql_connect(localhost,root,State of Qatar or die(无法连接数据库,请重试卡塔尔;
mysql_select_db(lyanban卡塔尔国 or die(不恐怕取舍数据库,请重试卡塔尔国; $query=select
password from tb where username=’$username’;
$result=mysql_query($query); $numrows=mysql_num_rows($result);
if($numrows!=0卡塔尔 {echo ‘已有人登记此名,请重新选用名字!a
href=javascript:history.go(-1);返回/a’;} else {$query=insert into
tb(username,password) values(‘$username’,’$password’);
mysql_query($queryState of Qatar; echo ‘注册成功’; echo ‘A HREF=guestbook.htm
请登入!/A’;} ? 以下是多少个配套的HTML: 1。留言网页 html head meta
content=text/html; charset=gb2312 meta name=GENERATO奥迪Q5 content=Microsoft
FrontPage 4.0 meta name=ProgId content=FrontPage.Editor.Document
title天地互连网留言版款待您留言!/title /head body bgcolor=#FFFFFF div
align=center center br font size=2天地网络留言版测量检验版/fontbr br form
method=post action=show.php3 table width=66% tr td width=二分之一 height=1
div align=center font size=2 您的高姓大名:/font/div /td td width=二分一height=1 div align=center input type=text name=name size=20 /div /td /tr
tr td width=二分之一 height=1 div align=centerfont size=2
您的电子邮件地址:/font/div /td td width=二分一 height=1 div align=center
input type=text name=email size=20 /div /td /tr tr td width=八分之四 height=1
div align=centerfont size=2 您的厂商主页地址:/font/div /td td width=四分之二height=1 div align=center input type=text name=homepage size=20 value=
/div /td /tr tr td width=二分之一 height=1 div align=center font
size=2留言主题:/font/div /td td width=百分之八十 height=1 valign=middle div
align=center input type=text name=topic size=20 /div /td /tr tr td
width=二分一 height=1 div align=center font size=2留言内容:/font/div /td
td width=二分之一 height=1 div align=center /div /td /tr tr td width=100%colspan=2 height=66 p align=center textarea rows=10 name=content
cols=50/textarea /p /td /tr tr td width=贰分一 height=18 div
align=center/div /td td width=四分之二 height=18 div align=center/div /td /tr
tr td width=四分之二 height=18 align=center p align=center input type=submit
value=公布留言 name=B1 /p /td td width=贰分之一 height=18 align=center div
align=center input type=reset value=整体重写 name=B2 /div /td /tr /table
/form /center /div p /p p /p /body /html 2.登记程序 html head
titleregiste/title meta content=text/html; charset=gb2312 /head body
bgcolor=#FFFFFF div align=center p/p p/p p客商注册/p form method=post
action=zhuc.php p客商名: input type=text name=username /p p密码: input
type=password name=password /p p input type=submit name=Submit
value=分明 input type=reset name=Submit2 value=重来 /p /form p/p /div
/body /html 如须求ZIP文件可给笔者写信。tandinet@163.net

本系统可以录入标题、内容、图片、相关软件,展现时会依照是或不是有有图表和连锁软件来决断是还是不是出示该项内容,张开页面显示的是最新的一片小说,点击目录会显示以前的篇章。
创立channelimages和channelsoft目录,并把权限设为777。
*********************************
news表结构
********************************* #
Host: localhost Database : yourdb #
——————————————————– # # Table
structure for table ‘yourtable’ # CREATE TABLE news( id int(11) DEFAULT
‘0’ NOT NULL auto_increment, kind varchar(16), title varchar(60),
content text, pic varchar(30), timer datetime DEFAULT ‘0000-00-00
00:00:00’ NOT NULL, soft varchar(30), PRIMARY KEY (id), KEY timer
(timer) );
*********************************
消息录入文件:insert.htm
********************************* html
head title音讯录入/title meta content=text/html; charset=gb2312 /head
body bgcolor=#FFFFFF form name=form1 enctype=multipart/form-data
action=insert.php method=post table width=81% border=0 cellspacing=2
cellpadding=0 align=center trtd width=11% align=right
bgcolor=#CC0000font color=#FFFFFF标题:/font/td td
bgcolor=#E7E7E7input type=text name=title size=60 /td /tr trtd
align=right bgcolor=#CC0000font color=#FFFFFF类别:/font/td td
bgcolor=#E7E7E7input type=radio name=kind value=类型1 类型1input
type=radio name=kind value=类型2 类型2 input type=radio name=kind
value=类型3 类型3 input type=radio name=kind value=类型4 类型4/td /tr
trtd width=11% align=right bgcolor=#CC0000font
color=#FFFFFF内容:/font/td td bgcolor=#E7E7E7textarea name=content
cols=60 rows=10/textarea /td /tr trtd width=11% align=right
bgcolor=#CC0000font color=#FFFFFF图片:/font/td td
bgcolor=#E7E7E7input type=file name=pic size=60 /td /tr trtd width=11%
align=right bgcolor=#CC0000font color=#FFFFFF软件:/font/td td
bgcolor=#E7E7E7input type=file name=soft size=60 /td /tr trtd width=11%
align=right bgcolor=#CC0000/td td bgcolor=#E7E7E7div align=centerinput
type=submit name=Submit value=提 交 /div /td /tr /table /form
/body/html*********************************
end of insert.htm
*********************************
*********************************
insert.php
********************************* ?
$day=date(md); If($pic != none){ $picname=$day.$pic_name;
copy($pic,channelimages/$picname); unlink($pic); } If($soft!= none){
copy($soft,channelsoft/$soft_name); unlink($soft); } $dbh
=mysql_connect(‘localhost’,’uesrname’,’passward’);
mysql_select_db(‘yourtable’);$dat=date(Y-m-d h:i:s); $query=insert
into news(title,kind,content,pic,timer,soft)
values(‘$title’,’$kind’,’$content’,’$picname’,now(),’$soft_name’); $res
= mysql_query($query,$dbh);$err = mysql_error(卡塔尔(قطر‎; if($err卡塔尔国{echo
$err;exit(卡塔尔国;} echo p/pp ; echo bodyh2录入成功/h2/body/p; ?
********************************* end
of insert.php
*********************************
*********************************
新闻显示文件:news.php
********************************* html
head title显示等级次序1/title meta 目录项目 content=文本/html; 字符集=gb2312
/head body bgcolor=#FFFFFF ?
$db=mysql_connect(localhost,username,passward);
mysql_select_db(yourtable,$db); $result=mysql_query(select id,title
from news where kind=’类型1′ order by timer desc); for($a=0;$a10;$a++)
{if(!($ahrow=mysql_fetch_row($result)))break;
$id=mysql_result($result,$a,id);
$title=mysql_result($result,$a,title); echo a
href=news.php?id=.$id..$title./abr; } if (!isset($id))
$id=mysql_result($result1,0,id); $result=mysql_query(select * from
news where id=$id order by timer desc);
$rows=mysql_fetch_row($result); echo brcenterfont color=ff0000; print
$rows[2]; echo /fontbr$rows[5]/center; if (strlen($rows[4])0) echo
pimg src=channelimages/$rows[4] align=right; echo
str_replace(/r,br,str_replace( ,,$rows[3])); if
(strlen($rows[6])0) echo /pp align=righta
href=channelsoft/$rows[6]点击下载/a/p; ? /body /html
********************************* end
of news.php
*********************************

You can leave a response, or trackback from your own site.

Leave a Reply

网站地图xml地图