这样更改了
- <?php
- /***********************************************************************/
- /*======================================= */
- /*插件名称﹕家族门派(Full House) */
- /*======================================= */
- /*适用版本﹕Discuz 4.1 */
- /*程序制作﹕含烟 */
- /* ΡˇΖΟΝΕ 版﹕旗” */
- /* Full House 版﹕ytc */
- /*技术支持﹕http://www.hkfullhouse.com/ */
- /***********************************************************************/
- @include DISCUZ_ROOT.'./forumdata/cache/plugin_family.php';
- $familysetting = $_DPLUGIN['family']['vars'];
- @include DISCUZ_ROOT.'./forumdata/cache/cache_settings.php';
- $familyconfig = $_DCACHE['plugins']['family'];
- //后台设置换成变数
- $path = $familysetting[path];
- $urlpath = $familysetting[urlpath];
- if($familysetting[openupload])
- {$openupload = 1;}else{$openupload = 0;}
- $leaveok = $familysetting[leaveok];
- $teamadd = $familysetting[teamadd];
- $peradd = $familysetting[peradd];
- $closeok = $familysetting[closeok];
- //后台设置换成变数
- /*********************以下地方请勿修改************************************/
- $navigation="家族";
- $index_width = "98%";
- $title="<a href="plugin.php?identifier=family&module=family"><font color=Blue>家族首页</font></a> > ";
- include "./plugins/family_menu.php";
- $view2="现金";$credit=$$familysetting[extcredit];
- //页面的右面部分
-
- $numquery=$db->query("select count(*) as rncts from {$tablepre}fam");
- $data=@mysql_fetch_array($numquery);
- $number=$data[rncts];
- if(!$action||$action=='index')
- {
- $title.="家族列表 (共有 $number 个家族)";
- $perpage=$familysetting[famdis];
- $start=($page-1)*$perpage;
- $mpurl="plugin.php?identifier=family&module=family&action=index";
- if(!$page) {
- $page = 1;
- }
- $start = ($page - 1) * $perpage;
- $query = $db->query("SELECT COUNT(*) FROM {$tablepre}fam");
- $num = $db->result($query, 0);
- $multipage = multi($num, $perpage, $page, $mpurl);
- $query=$db->query("select * from {$tablepre}fam order by level desc limit $start,$perpage");
- $view="
- <TABLE cellSpacing=4 cellPadding=4 width=99% border=0>
- <TBODY>
- <TR>
- </table>
- <br> <table width="96%" cellspacing="0" cellpadding="0" align="center">
- <tr><td class="multi">$multipage</td></tr>
- </table>
- <br>
- <table cellspacing="0" cellpadding="0" border="0" width="96%" align="center" bgcolor="#CBCED6">
- <tr><td>
- <table border="0" cellspacing="1" cellpadding="4" width="100%" style="table-layout: fixed; word-wrap: break-word">
- <tr class="header">
- <td width="22%"align="center">家族标志</td>
- <td width="14%" align="center">名称</td>
- <td width="30%" align="center">简介</td>
- <td width="13%" align="center">族长</td>
- <td width="7%" align="center">人数</td>
- <td width="13%" align="center">财富($view2)</td>
- </tr>
- </table>
- </td></tr>
- </table>
- <br>";
- $i=0;
- while($mp=@mysql_fetch_array($query))
- {
- $mp[createtime] = gmdate($dateformat, $mp[createtime] + ($timeoffset * 3600));
- $mp[newmember] = gmdate($dateformat, $mp[newmember] + ($timeoffset * 3600));
- $dataquery=mysql_query("select count(*) as rnct from {$tablepre}members where fam='$mp[fmname]'");
- $data=@mysql_fetch_array($dataquery);
- if(!$mp[fmimg])$mp[fmimg]="images/no.gif";
- $famlevel = (floor($mp[cmoney]) / ($familysetting[mylv]) + ($data[rnct]) * ($familysetting[mblv]));
- $maxmb=floor($familysetting[lvhvmb] * $mp[level]);
- $db->query("UPDATE {$tablepre}fam SET level = $famlevel , mb = $data[rnct] , maxmb = $maxmb WHERE cmoney = $mp[cmoney]");
- $i++;
- $view.="
- <table cellspacing="0" cellpadding="0" border="0" width="96%" align="center" bgcolor="#CBCED6">
- <tr><td>
- <table border="0" cellspacing="1" cellpadding="3" width="100%" style="table-layout: fixed; word-wrap: break-word">
- <tr>
- <td bgcolor="#FFFFFF" width="22%" align="center"><a href="plugin.php?identifier=family&module=family&action=view&fmid=$mp[fmid]"><IMG alt="$mp[mpname]" src="$mp[fmimg]" width=100 border=0></a></td>
- <td bgcolor="#FCFCFC" width="14%" align="center"><a href="plugin.php?identifier=family&module=family&action=view&fmid=$mp[fmid]">$mp[fmname]</a></td>
- <td bgcolor="#FFFFFF" width="30%\ align="center">家族建立日:$mp[createtime]<br>新会员入会日:$mp[newmember]<br>家族等级:$mp[level]</td>
- <td bgcolor="#FCFCFC" width="13%" align="center"><a href="viewpro.php?username=$mp[username]">$mp[username]</a></td>
- <td bgcolor="#FFFFFF" width="7%" align="center">$mp[mb]<br> <br><font color="red">$mp[maxmb]</font></td>
- <td bgcolor="#FCFCFC" width="13%" align="center">$mp[cmoney]</td>
- </tr>
- </table>
- </td></tr>
- </table>
- <br>
- <TABLE cellSpacing=0 cellPadding=0 width="96%" align="center">
- <TBODY>
- <TR>
- <TD height=4></TD></TR>
- <TR>
- <TD background="images/newyear/dotline_blue.gif"></TD></TR>
- <TR>
- <TD height=20></TD></TR></TBODY></TABLE>";
- if($i%10==0) $view.=" </TR><tr>";
- }
- $view.=" </TR>
- </TBODY>
- </TABLE>";
- if($i%10==0)$view.="</tr><tr>";
- }else if($action=='add'){
- $title.="注册家族(需花费 $familysetting[actmon] 个 $view2)";
- if($act=='save')
- {
- if(!$discuz_user)showmessage("你还没有登陆","plugin.php?identifier=family&module=family");
复制代码 |