我把他轉譯成繁體了
但不知道直接用在phpbb能不能用\r
是FOR Discuz
不是asp的
大家幫幫忙
看能不能改成phpbb的
代碼: 選擇全部
***************************結婚插件FOR Discuz! 2.00**********************************
功能演示:
http://www.5308.com/marry.php
安裝說明:
1.在mysql中建立如下表結構:
alter table cdb_members add hw varchar(15) NULL;
drop table if exists jie;
CREATE TABLE jie (
ID mediumint( 8 ) unsigned NOT NULL AUTO_INCREMENT ,
username varchar( 15 ) NOT NULL ,
thename varchar( 15 ) NOT NULL ,
year int( 10 ) unsigned NULL,
longs int( 10 ) unsigned NULL,
addtime int( 10 ) unsigned NULL ,
TYPE tinyint( 3 ) unsigned NOT NULL default '0',
content text NULL ,
jiehun tinyint( 1 ) unsigned NOT NULL default '0',
KEY ( ID )
) TYPE = MYISAM;
drop table if exists qiuhun;
CREATE TABLE qiuhun (
ID mediumint( 8 ) unsigned NOT NULL AUTO_INCREMENT ,
username varchar( 15 ) NOT NULL ,
tousername varchar( 15 ) NOT NULL ,
addtime int( 10 ) unsigned NULL ,
message text NULL ,
dlg tinyint( 1 ) unsigned NOT NULL default '0',
jiehun tinyint( 1 ) unsigned NOT NULL default '0',
content text NULL,
KEY ( ID )
) TYPE = MYISAM;
drop table if exists jhzhufu;
CREATE TABLE jhzhufu (
ID mediumint( 8 ) unsigned NOT NULL AUTO_INCREMENT ,
jhid mediumint( 8 ) unsigned NOT NULL,
username varchar( 15 ) NOT NULL ,
tousername varchar( 15 ) NOT NULL ,
addtime int( 10 ) unsigned NULL ,
lmoney int( 10 ) unsigned NULL,
message text NULL ,
KEY ( ID )
) TYPE = MYISAM;
2.將marry.php及marry目錄上傳到論壇根目錄,將img_marry目錄上傳到論壇images目錄
3.修改config.php
在\r
$plugins[] = array ( "name" => "虛擬形像",
"url" => "virtualimage.php",
"cpurl" => "" );
後面添加:
$plugins[] = array ( "name" => "天賜良緣",
"url" => "marry.php",
"cpurl" => "" );
4.修改viewthread.php
找到\r
$querypost = $db->query("SELECT p.*, a.aid AS aaid, a.creditsrequire, a.filetype, a.filename, a.attachment, a.filesize, a.downloads, m.uid, m.username, m.gender, m.status, m.regdate, m.lastvisit, m.postnum,m.goldgrd, m.credit, m.money,m.email, m.site, m.icq, m.oicq, m.yahoo, m.msn, m.location, m.avatar, m.signature, m.customstatus, m.showemail, m.useimages FROM $table_posts p LEFT JOIN $table_members m ON m.username=p.author LEFT JOIN $table_attachments a ON p.aid<>'0' AND p.aid=a.aid WHERE p.tid='$tid' ORDER BY dateline LIMIT $start_limit, $ppp");
在FROM前面加
, m.hw
找到\r
if($groupinfo['groupavatar']) {
$post['avatar'] = image($groupinfo['groupavatar']);
} elseif($groupinfo['allowavatar'] && $post['avatar']) {
$post['avatar'] = image($post['avatar']);
} else {
$post['avatar'] = '';
}
在前面加
if (!$post[hw]) {
$post[hw]='未婚';
}
找到\r
$post['postnum'] = $post['credit'] = $post['regdate'] = $post['money'] = $post['gender'] = 'N/A';
在'N/A'前面加
$post['hw'] =
5.修改viewthread.htm
找到\r
{lang postnum} $post[postnum]<br>
在後面加
配偶 <font color=Orange><b>$post[hw]</b></font><br>
注:1.請先安裝金錢或銀行插件,以確保cdb_members表中存在money字段\r
2.如果不想安裝金錢或銀行,請更改marry.php:
$mc='money'; //如果未安裝金錢或銀行插件,請將money改為credit,用積分代替金錢\r
3.請先安裝 t.o.m. 虛擬形像 for Discuz!2.0
4.如果安裝後不能正常運行,請將所有文件中的$mc跟據具體情況替換為money或是credit
5.本人不保證此插件在您的環境下完全能夠正常運行,運行不正常時請參見本說明文件自行調試。
6.此插件的制作完全出於個人興趣,說明文件也比較詳細,因此不提供技術支持。
7.此插件圖片資源及風格取自動網同類插件,對作者一並表示感謝。
8.使用此插件請為本站加個鏈接,謝謝合作!http://www.5308.com/index.php
****************************************************(完)***********************************************************
九尾銀狐
2003.09.18 凌晨 00:15
www.5308.com
代碼: 選擇全部
<?php
require "./include/common.php";
$tplnames = "css,header,footer";
$navigation = "» 天賜良緣";
$navtitle .= " - 天賜良緣";
eval("\$css = \"".template("css")."\";");
eval("\$header = \"".template("header")."\";");
eval("\$footer = \"".template("footer")."\";");
$mc='money'; //如果未安裝金錢或銀行插件,請將money改為credit,用積分代替金錢\r
if(!$discuz_user)
{
showmessage("對不起,此功能隻對會員開放,請先登錄.",'logging.php?action=login&club=3');
}
$query=$db->query("select uid,gender,hw,$mc from $table_members WHERE username='$discuz_user'");
$zqz=$db->fetch_array($query);
if (!$zqz['gender']) {
showmessage("您還未明確你的性別,請至<a href=memcp.php?action=profile><font color=red><b>控制面板</b></font></a>中修改。",'memcp.php?action=profile');
}
$money=$zqz[$mc];
$discuz_action = 61;
include ($header);
define("MARRY_INDEX", TRUE);
switch($index) {
default:
include 'marry/marry_index.php';
break;
case 'dglistall':
include "marry/marry_dglistall.php";
break;
case 'courtship':
include "marry/marry_courtship.php";
break;
case 'statute':
include "marry/marry_statute.php";
break;
case 'manager':
include "marry/marry_manager.php";
break;
case 'register':
include "marry/marry_register.php";
break;
case 'cabaret':
include "marry/marry_cabaret.php";
break;
case 'jiuyan':
include "marry/marry_jiuyan.php";
break;
case 'book':
include "marry/marry_book.php";
break;
}
?>
代碼: 選擇全部
<?php
if(!defined("MARRY_INDEX")) {
die("Access Denied");
}
include 'marry/marry_menu.php';
$marry_login_ = 'yes';
include 'marry/marry_global.php';
echo $marry_nav;
if (!$id) {
marry_showmessage("您無權查看該信息!",'marry.php');
}
$query=$db->query("select * from jie where ID='$id' and jiehun='1'");
if (!$db->num_rows($query)) {
marry_showmessage("您無權查看該信息!",'marry.php');
}
$querydata=$db->fetch_array($query);
if ($querydata[username]!=$discuz_user && $querydata[thename]!=$discuz_user ) {
marry_showmessage("您無權查看該信息!",'marry.php');
}
$zhufuquery=$db->query("select * from jhzhufu where jhid='$id' order by ID DESC");
$zhufu='';
$rows=$db->num_rows($zhufuquery);
if (!$rows) {
$zhufu.='';
} else {
while ($zhufudata=$db->fetch_array($zhufuquery)) {
$at= gmdate("$dateformat $timeformat", $zhufudata[addtime] + $timeoffset * 3600);
$zhufu.=$at.' '.$zhufudata[tousername].' 的親友 <a href=viewpro.php?username='.$zhufudata[username].'>'.$zhufudata[username].'</a><br>
送上禮金:<font color=green>'.$zhufudata[lmoney].$moneyunit.'</font><br>送上祝福:<font color=blue>'.$zhufudata[message].'</font><br><br>';
}
}
?>
<TABLE border=0 cellPadding=0 cellSpacing=0 widthv0 align="center" height="418">
<TBODY>
<TR>
<TD vAlign=top widthQ9 background="images/img_marry/index_bg.jpg" height="418"><BR><BR>
<TABLE align姷ter border=0 borderColor=#ff7010 cellPadding=0
cellSpacing=0 width`9 height="138">
<TBODY>
<TR>
<TD width="607" height="138">
<div align="center">
<center>
<TABLE border=1 borderColor=#ff7010 cellPadding=0 cellSpacing=1
width="58%" align="right" height="75">
<TBODY>
<TR>
<TD width="100%" valign="middle" align="center" height="20">
<b><font color=green>共有(<?=$rows?>)條祝福</font></b>
</td>
</TR>
<tr><TD width0% valign="middle" align="center" height="24" colspan=5>
<MARQUEE class?onmouseover=this.stop()
onmouseout=this.start() scrollAmount=1 scrollDelay0
direction=up width00 height?
<?=$zhufu?>
</MARQUEE>
</td></tr>
</TBODY></TABLE></center>
</div>
</TD></TR></TBODY></TABLE><BR><BR></TD>
</TR>
</TBODY></TABLE>
<?php
include $footer;
?>
代碼: 選擇全部
<?php
if(!defined("MARRY_INDEX")) {
die("Access Denied");
}
include 'marry/marry_menu.php';
$marry_login_ = 'yes';
include 'marry/marry_global.php';
echo $marry_nav;
if ( !$id ) {
$id=1;
}
switch ($id) {
case 1 :
$name='一心一意';
break;
case 2 :
$name='比翼雙飛';
break;
case 3 :
$name='三生有幸';
break;
case 4 :
$name='海誓山盟';
break;
case 5 :
$name='五彩繽紛';
break;
case 6 :
$name='流光飛舞';
break;
case 7 :
$name='郎情妾意';
break;
case 8 :
$name='白頭到老';
break;
case 9 :
$name='天長地久';
break;
default :
$name='一心一意';
break;
}
?>
<SCRIPT language=JavaScript>
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
</SCRIPT>
<BODY bgColor=#ffffff leftMargin=0
onload="MM_preloadImages('images/img_marry/index_1h.gif','images/img_marry/index_2h.gif','images/img_marry/index_3h.gif','images/img_marry/index_4h.gif','images/img_marry/index_5h.gif','images/img_marry/index_6h.gif','images/img_marry/index_7h.gif','images/img_marry/index_8h.gif','images/img_marry/index_9h.gif')"
text=#000000 topMargin=0>
<TABLE border=0 cellPadding=0 cellSpacing=0 widthw0 align="center" height="403">
<TBODY>
<TR>
<TD class=ct-def2 height@ width0><img border="0" src="images/img_marry/left.jpg"></TD>
<TD class=ct-def2 height@ width46>
<img border="0" src="images/img_marry/middle.jpg"></TD>
<TD bgColor=#F82828 class=ct-def2 height@ width24>
<img border="0" src="images/img_marry/right.jpg"></TD>
</TR>
<TR>
<TD background=images/img_marry/jiubj.gif colSpan=3
height% width="770"> </TD></TR>
<TR>
<TD colSpan=3 height="158" width="770">
<TABLE border=0 cellPadding=0 cellSpacing=0 widthv9 height="157">
<TBODY>
<TR>
<TD height7 width3 valign="top">
<img border="0" src="images/img_marry/girl.gif"></TD>
<TD height7 widthU0 background="images/img_marry/jhbj.gif">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1" height="146">
<TR>
<TD height7><A
href="marry.php?index佒aret&id=1"
onmouseout=MM_swapImgRestore()
onmouseover="MM_swapImage('a','','images/img_marry/index_1h.gif',1)"
target=list><IMG border=0 height 8 name=a
src="images/img_marry/index_1.gif" width8></a></TD>
<TD><A
href="marry.php?index佒aret&id=2"
onmouseout=MM_swapImgRestore()
onmouseover="MM_swapImage('b','','images/img_marry/index_2h.gif',1)"
target=list><IMG border=0 height 8 name=b
src="images/img_marry/index_2.gif" width8></A></TD>
<TD><A
href="marry.php?index佒aret&id=3"
onmouseout=MM_swapImgRestore()
onmouseover="MM_swapImage('c','','images/img_marry/index_3h.gif',1)"
target=list><IMG border=0 height 8 name=c
src="images/img_marry/index_3.gif" width8></A></TD>
<TD><A
href="marry.php?index佒aret&id=4"
onmouseout=MM_swapImgRestore()
onmouseover="MM_swapImage('d','','images/img_marry/index_4h.gif',1)"
target=list><IMG border=0 height 8 name=d
src="images/img_marry/index_4.gif" width8></A></TD>
<TD><A
href="marry.php?index佒aret&id=5"
onmouseout=MM_swapImgRestore()
onmouseover="MM_swapImage('e','','images/img_marry/index_5h.gif',1)"
target=list><IMG border=0 height 8 name=e
src="images/img_marry/index_5.gif" width8></A></TD>
<TD><A
href="marry.php?index佒aret&id=6"
onmouseout=MM_swapImgRestore()
onmouseover="MM_swapImage('f','','images/img_marry/index_6h.gif',1)"
target=list><IMG border=0 height 8 name=f
src="images/img_marry/index_6.gif" width8></A></TD>
<TD><A
href="marry.php?index佒aret&id=7"
onmouseout=MM_swapImgRestore()
onmouseover="MM_swapImage('g','','images/img_marry/index_7h.gif',1)"
target=list><IMG border=0 height 8 name=g
src="images/img_marry/index_7.gif" width8></A></TD>
<TD><A
href="marry.php?index佒aret&id=8"
onmouseout=MM_swapImgRestore()
onmouseover="MM_swapImage('h','','images/img_marry/index_8h.gif',1)"
target=list>
<IMG border=0 height 8 name=h
src="images/img_marry/index_8.gif" width8></A></TD>
<TD><A
href="marry.php?index佒aret&id=9"
onmouseout=MM_swapImgRestore()
onmouseover="MM_swapImage('i','','images/img_marry/index_9h.gif',1)"
target=list><IMG border=0 height 8 name=i
src="images/img_marry/index_9.gif"
width7></A></TD></TR></td>
</table>
</TD>
<TD height7 width?valign="top">
<img border="0" src="images/img_marry/boy1.gif"></TD>
</TR>
</TBODY></TABLE></TD></TR>
<TR>
<TD align=right background=images/img_marry/index_bg1.gif class=ct-def2 colSpan=3 height width="770">
<FONT color=#ffffff>正在進行的婚禮酒席*</FONT> </TD></TR>
<TR>
<TD bgColor=#fcc182 colSpan=3 height vAlign姷ter width="770">
<img src="" height width=0><?=$name?>
<table width="770" border="0" cellspacing="0" cellpadding="0" class=ct-def2>
<?php
$timec=time();
$query=$db->query("select * from jie where TYPE='$id' and '$timec'-year>=0 and '$timec'-year<=longs and jiehun='1' " );
if (!$db->num_rows($query)) {
?>
<tr class=ct-def2>
<td bgcolor?000 width0% align姷ter valign=middle><img src="" height# width=0>現在沒有人結婚</td>
</tr>
<?php
} else {
?>
<tr class=ct-def2>
<td bgcolor?000 widthE> </td>
<td bgcolor?000 width0 align=left><font color=#FFFFFF>新郎</font> <img src=images/img_marry/index_male.gif width% height#></td>
<td bgcolor?000 width0 align=left><font color=#FFFFFF>新娘</font> <img src=images/img_marry/index_female.gif width% height#></td>
<td bgcolor?000 width0 align=left><font color=#FFFFFF>開始時間</font> <img src=images/img_marry/index_time.gif width" height#></td>
<td bgcolor?000 width0 align=left><font color=#FFFFFF>結束時間</font> <img src=images/img_marry/index_time.gif width" height#></td>
<td bgcolor?000 widthP align=left> </td>
<td bgcolor?000 widthE> </td>
</tr>
<?php
while ($querydata=$db->fetch_array($query)) {
$temp=$db->fetch_array($db->query("select gender from $table_members where username='$querydata[username]'"));
if ($temp[gender]==1) {
$xlg=$querydata[username];
$xn=$querydata[thename];
} elseif ($temp[gender]==2) {
$xlg=$querydata[thename];
$xn=$querydata[username];
} else {
marry_showmessage("繫統數據出錯,不能執行,請返回!");
}
$starttime=gmdate("$dateformat $timeformat", $querydata[year] + $timeoffset * 3600);
$endtime=gmdate("$dateformat $timeformat", $querydata[year] + $querydata[longs] + $timeoffset * 3600);
?>
<tr>
<td widthE></td>
<td align=left width0><img src="" height width=0> <a href=viewpro.php?username=<?=$xlg?> target="_blank" title="查看<?=$xlg?>的資料"><?=$xlg?></a> </td>
<td align=left width0><img src="" height width=0> <a href=viewpro.php?username=<?=$xn?> target="_blank" title="查看<?=$xn?>的資料"><?=$xn?></a> </td>
<td align=left width0><?=$starttime?></td>
<td align=left width0><?=$endtime?></td>
<td align=left widthP><a href=marry.php?index=jiuyan&id=<?=$querydata[ID]?> target=_parent title="參加婚宴">喝喜酒去</a></td>
<td widthE align=left></td>
</tr>
<?php
}
}
?>
</table>
</td>
</tr>
</TBODY></table>
</body>
<?php
include $footer;
?>
http://myweb.hinet.net/home2/mar333/mar ... scuz20.rar
我也來改看看
大家幫幫忙呀

