无心宠物帖子内显示(玫瑰花 版)for pw6.0
jb51
3、查找:
复制内容到剪贴板
代码:
$anonymous=($read['anonymous'] && !$SYSTEM['viewhide'] && !$admincheck && $winduid!=$read['authorid']) ? 1 : 0;
在其下面加入
复制内容到剪贴板
代码:
//宠物数据>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
if($read['petname']!=''){
if ($read['openpk'] == 0) {
$read['pk'] = "<font color=gray>躲在家里</font>";
}else{
$read['pk'] = "<a href=pet.php?index=petbattle&atkname=$read[username]&action=askpk><font color=red>接受挑战</font></a>";
}
$petjob = $read['mypetjob'];
$petlevel= $read['mypetlevel'];
$levelpic = ($petlevel/10)>11?11:intval($petlevel/10);
if ($petjob == 0 or ($petjob <=3 && $petlevel < 200) or $read['mypetpic']=='') {
$read['petpic'] = "<img src=wxpet/images/pet/$read[pettype]/$read[pettype]$levelpic.gif border=0>";
} else {
$read['petpic'] = "<img src=$read[mypetpic] border=0>";
}
$petlevelfloor = pow (log10 (ceil($read['mypetexp']/ ($petjob * 0.2 1))), 3);
$epf=intval (100 * ($petlevelfloor - intval ($petlevelfloor)));
$hpf = floor (100 * ($read['mypethp'] / $read['mypetmaxhp']));
$mpf = $read['mypetmaxmp']?(floor (100 * ($read['mypetmp'] / $read['mypetmaxmp']))):0;
$spf = floor (100 * ($read['mypetsp'] / 5000)) - 1;
$read['epf']=$epf>97?97:$epf;
$read['hpf']=$hpf>97?97:$hpf;
$read['mpf']=$mpf>97?97:$mpf;
$read['spf']=$spf>97?97:$spf;
$read['petdead']= $read['mypetdead']?'死 亡':'生存';
$petgood = $read['mypetgood'];
if ($petgood >= 100) {
$read['shit'] = "死忠";
}elseif($petgood >=50) {
$read['shit']="忠诚";
}elseif($petgood >= -50) {
$read['shit'] = "猜疑";
}elseif($petgood > -100) {
$read['shit'] = "厌恶";
}else{
$read[shit] = "<font color=red>不鸟!</font>";
}
}
//宠物数据<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
============================================================================
二、修改 template/wind/read.htm
查找:
复制内容到剪贴板
代码:
<b>$read[author]</b>
下面添加:
复制内容到剪贴板
代码:
<!--
EOT;
if($read[nums]){print <<<EOT
-->
<span class="fr"><img src='wxpet/images/item/other/rose.gif' alt="玫瑰花" width="15px" height="15px"> <font color="red" title="{$read[fromuser]}"><b>$read[nums]</b> 朵</font></span>
<!--
EOT;
}print <<<EOT
-->
查找:
复制内容到剪贴板
代码:
最后登录:{$read[lastlogin]} </span>
</span></span>
</th>
修改为:
复制内容到剪贴板
代码:
最后登录:{$read[lastlogin]} </span>
</span></span>
<!--
EOT;
if($read[petname]){print <<<EOT
-->
<div align="left">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td>
<fieldset style='width:95%;'>
<legend><font color=red>宠物信息</font></legend>
<div align="center">宠物名: <a href="pet.php?index=viewpet&username=$read[username]">$read[petname]</a><br>
<script language="JavaScript">
var i=0;
function draw(obj,s){
if(obj.style.display=='none'){
obj.style.display='block';
s.innerHTML='[<font color=red>隐藏宠物资料</font>]';
}else{
obj.style.display='none';
s.innerHTML='[<font color=blue>显示宠物资料</font>]';
}
}
</script>
<span style=cursor:hand onclick=draw(none$read[lou],block$read[lou]) id=block$read[lou] title="显示/隐藏 宠物资料">[<font color=blue>显示宠物资料</font>]</span>
</div><br>
<div id=none$read[lou] style=display:none>
<div align="center">$read[petpic]</div>
宠物: $read[petdead] $read[shit] $read[pk]<br>
级别: $read[mypetjob] 转/ $read[mypetlevel] 级<br>
HP: $read[mypethp] / $read[mypetmaxhp]<br>
<table width='98%' border='0' cellspacing='0' cellpadding='0' bordercolor='#000000'>
<tr>
<TD width=3 height=13><IMG height=13 src='wxpet/images/rpg/img_left.gif' width=3></TD>
<TD background= "wxpet/images/rpg/img_backing.gif" height=13><img src='wxpet/images/rpg/orange.gif' width=' $read[hpf]%' height='9'><img src=' wxpet/images/rpg/hp.gif' height='9'></td>
<TD width=3 height=13><IMG height=13 src='wxpet/images/rpg/img_right.gif' width=3></TD>
</tr>
</table>
MP: $read[mypetmp] / $read[mypetmaxmp]<br>
<table width='98%' border='0' cellspacing='0' cellpadding='0' bordercolor='#000000'>
<tr>
<TD width=3 height=13><IMG height=13 src='wxpet/images/rpg/img_left.gif' width=3></TD>
<TD background="wxpet/images/rpg/img_backing.gif" height=13><img src='wxpet/images/rpg/blue.gif' width=' $read[mpf]%' height='9'><img src='wxpet/images/rpg/exp.gif' height='9'></td>
<TD width=3 height=13><IMG height=13 src='wxpet/images/rpg/img_right.gif' width=3></TD>
</tr>
</table>
SP: $read[mypetsp] / 5000<br>
<table width='98%' border='0' cellspacing='0' cellpadding='0' bordercolor='#000000'>
<tr>
<TD width=3 height=13><IMG height=13 src='wxpet/images/rpg/img_left.gif' width=3></TD>
<TD background="wxpet/images/rpg/img_backing.gif" height=13><img src=' wxpet/images/rpg/green.gif' width='$read[spf]%' height='9'><img src='wxpet/images/rpg/mp.gif' height='9'></td>
<TD width=3 height=13><IMG height=13 src=' wxpet/images/rpg/img_right.gif' width=3></TD>
</tr>
</table>
EXP: $read[epf]% [ $read[mypetexp] ]<br>
<table width='98%' border='0' cellspacing='0' cellpadding='0' bordercolor='#000000'>
<tr>
<TD width=3 height=13><IMG height=13 src='wxpet/images/rpg/img_left.gif' alt= $read[mypetexp] width=3></TD>
<TD background="wxpet/images/rpg/img_backing.gif" height=13><img src='wxpet/images/rpg/blue.gif' width='$read[epf]%' alt= $read[mypetexp] height='9'><img src=' wxpet/images/rpg/exp.gif' alt= $read[mypetexp] height='9'></td>
<TD width=3 height=13><IMG height=13 src='wxpet/images/rpg/img_right.gif' alt= $read[mypetexp] width=3></TD>
</tr>
</table>
</div>
</fieldset>
</td></tr>
</table>
</div> <!--
EOT;
}print <<<EOT
-->
</th>
今天,你打工了吗?打工可以赚钱,你还不知道?