Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

谁研究一下PWQQ农场后台呢???

[复制链接]
潘安 发表于 2010-2-11 04:53:12 | 显示全部楼层 |阅读模式
UCHome插件
语言编码: GBK简体 
插件名称:
插件作者:
适用版本: UCHome 2.0
<?php
!function_exists('adminmsg') && exit('Forbidden'); include(H_P."happyfarm/data/farm_config.php"); $farm_config = $_1; if(!$action){ if($farm_config[farm_open])$farm_open_1="checked";else $farm_open_0="checked"; $rvrc_st = $money_st = $credit_st = $currency_st = ''; ${$farm_config['credit'].'_st'} = 'selected'; $usergroup = ""; $num = 0; foreach ($ltitle as $key => $value) { if ($key != 1 && $key != 2) { $checked = ''; if (strpos($farm_config['groups'],','.$key.',') !== false) { $checked = 'checked'; } $num++; $htm_tr = $num%4 == 0 ? '</tr><tr>' : ''; $usergroup .=" <td width='20%'><input type='checkbox' name='groups[]' value='$key' $checked>$value</td>$htm_tr"; } } include PrintHack('admin');exit; } elseif($action == "item"){ InitGP(array('step','cid','config')); $_0=unserialize(file_get_contents(H_P."happyfarm/require/farm.dat")); if($step == 'editok'){ $config[tName] = escape($config[tName]); $config[depict] = escape($config[depict]); $config[effect] = $config[effect]*3600; foreach($config as $key=>$value){ $_0[Toolstype][$cid][$key]=$value; } writeover(H_P."happyfarm/require/farm.dat",serialize($_0)); adminmsg('工具修改成功!'); } include PrintHack('admin');exit; } elseif($action == "decorative"){ InitGP(array('step','cid','config')); $_0=unserialize(file_get_contents(H_P."happyfarm/require/farm.dat")); if($step == 'editok'){ $config[itemName] = escape($config[itemName]); $config[itemDesc] = escape($config[itemDesc]); $config[itemValidTime] = $config[itemValidTime]*86400; foreach($config as $key=>$value){ $_0[itemtype][$config[itemId]][$key]=$value; } writeover(H_P."happyfarm/require/farm.dat",serialize($_0)); adminmsg('装饰修改成功!'); } include PrintHack('admin');exit; } elseif($action == "farmup"){ include_once H_P."happyfarm/require/farm.php"; $_0[tudiarr] = $tudiarr; $_0[cropstype] = $cropstype; $_0[cropstime] = $cropstime; $_0[Toolstype] = $Toolstype; $_0[itemtype] = $itemtype; $_0[randseed] = $randseed; writeover(H_P."happyfarm/require/farm.dat",serialize($_0)); adminmsg('导入农作物数据成功!'); } elseif($action == "animalup"){ include_once H_P."happyfarm/require/animal.php"; $_0[animaltime] = $animaltime; $_0[animaltype] = $animaltype; $_0[animalname] = $animalname; $_0[get_food] = $get_food; writeover(H_P."happyfarm/require/animal.dat",serialize($_0)); adminmsg('导入动物数据成功!'); } elseif($action == "farm"){ InitGP(array('step','cid','config')); $_0=unserialize(file_get_contents(H_P."happyfarm/require/farm.dat")); $randseeduid = implode(',',$_0[randseed]); if($step=='editok'){ $config[cName]=escape($config[cName]); $config[growthCycle] = $_0[cropstype][$config[cId]][growthCycle]; foreach($config as $key=>$value){ $_0[cropstype][$config[cId]][$key]=$value; } writeover(H_P."happyfarm/require/farm.dat",serialize($_0)); adminmsg('编辑农作物数据成功!'); }elseif($step=='randseed'){ InitGP(array('randseeduid')); $_0[randseed] = explode(',',$randseeduid); writeover(H_P."happyfarm/require/farm.dat",serialize($_0)); adminmsg('修改隐藏种子成功!'); } include PrintHack('admin');exit; } elseif($action == "animal"){ InitGP(array('step','cid','config','config1')); $_0=unserialize(file_get_contents(H_P."happyfarm/require/animal.dat")); if($step=='editok'){ $config[cName]=escape($config[cName]); $config[maturingTime] = $config[maturingTime]*3600; $config[procreation] = $config[procreation]*3600; $config[cub] = $config[cub]*3600; $_0[animalname][$config[cId]][liangci]=escape($config1[dll]); $_0[animalname][$config[cId]+10000][liangci] = escape($config1[liangci]); $_0[animalname][$config[cId]+10000][act] = escape($config1[act]); $_0[animalname][$config[cId]+10000][name] = escape($config1[name]); foreach($config as $key=>$value){ $_0[animaltype][$config[cId]][$key]=$value; } writeover(H_P."happyfarm/require/animal.dat",serialize($_0)); adminmsg('编辑动物数据成功!'); } include PrintHack('admin');exit; } elseif($action == "unsubmit"){ InitGP(array('config','groups'),'P'); if(is_array($groups)){ $config['groups'] = ','.implode(',',$groups).','; } else { $config['groups'] = ''; } $datadb = "<?php\r\n\$_1 = array(\r\n"; foreach($config as $key => $value){ if(!is_numeric($value) && $key<>'groups'&&$key<>'credit') $value=$farm_config[$key]; if($key == 'farm_rand' && $value<1)$value = $farm_config[$key]; elseif($key == 'cao_rand' && $value<10)$value = $farm_config[$key]; elseif($key == 'chong_rand' && $value<10)$value = $farm_config[$key]; elseif($key == 'han_rand' && $value<10)$value = $farm_config[$key]; $datadb .= "'".$key."'=>'".$value."',\r\n"; } $datadb .= ");\r\n?>"; writeover(H_P."happyfarm/data/farm_config.php",$datadb); adminmsg('保存成功!'); } elseif($action == "user"){ $userdb = array(); $userdb[uid] = '用户UID'; $userdb[money] = '输入金币数量'; $userdb[yb] = '输入Y币数量'; $userdb[jb] = '输入J币数量'; $userdb[vip] = '输入VIP等级'; $userdb[nc_exp] = '输入经验数量'; $userdb[mc_exp] = '输入经验数量'; $userdb[nc_level] = '**'; $userdb[mc_level] = '**'; $rt= $db->get_one("SELECT COUNT(*) AS sum FROM pw_11rpfarm_config"); InitGP(array('step','page')); if($step =='submitnc_user'){ InitGP(array('uid')); $userdb = $db->get_one("SELECT a.uid,a.money,a.yb,a.jb,a.vip,b.exp as nc_exp,b.reclaim,c.exp as mc_exp FROM pw_11rpfarm_config a LEFT JOIN pw_11rpfarm_nc b ON a.uid=b.uid LEFT JOIN pw_11rpfarm_mc c ON a.uid=c.uid WHERE a.uid='$uid'"); if(!$userdb)adminmsg('本站没有这个用户UID'); $userdb[vip] = substr($userdb[vip],-1); $userdb[nc_level] = floor(sqrt($userdb[nc_exp]*0.01+0.25)-0.5); $userdb[mc_level] = floor(sqrt($userdb[mc_exp]*0.01+0.25)-0.5); empty($userdb[mc_exp])&&$userdb[mc_level]="未开通"; empty($userdb[mc_exp])&&$userdb[mc_exp]="未开通"; }elseif($step == 'submitnc_listall'){ $db_perpage = 30; (!is_numeric($page) || $page < 1) && $page = 1; $limit = pwLimit(($page-1)*$db_perpage,$db_perpage); $rt = $db->get_one("SELECT COUNT(*) AS sum FROM pw_11rpfarm_nc"); $pages = numofpage($rt['sum'],$page,ceil($rt['sum']/$db_perpage),"$basename&action=user&step=submitnc_listall&"); $query = $db->query("SELECT a.uid,a.money,a.yb,a.vip,b.exp as nc_exp,b.reclaim,c.exp as mc_exp,d.username FROM pw_11rpfarm_config a LEFT JOIN pw_11rpfarm_nc b ON a.uid=b.uid LEFT JOIN pw_11rpfarm_mc c ON a.uid=c.uid LEFT JOIN pw_members d ON a.uid=d.uid WHERE b.exp>0 ORDER BY b.exp DESC $limit"); $userdb=array(); while ( $value = $db->fetch_array( $query ) ){ $value[nc_level] = floor(sqrt($value[nc_exp]*0.01+0.25)-0.5); $value[mc_level] = floor(sqrt($value[mc_exp]*0.01+0.25)-0.5); empty($value[mc_exp])&&$value[mc_level]="未开通"; empty($value[mc_exp])&&$value[mc_exp]="未开通"; $value[vip] = substr($value[vip],-1); $userdb[] = $value; } }elseif($step == 'submitnc_ok'){ InitGP(array('config','groups'),'P'); if(!is_numeric($config['nc_exp'])) $config['nc_exp']=0; if(!is_numeric($config['mc_exp'])) $config['mc_exp']=0; if(!is_numeric($config['money'])) $config['money']=0; if(!is_numeric($config['yb'])) $config['yb']=0; if(!is_numeric($config['jb'])) $config['jb']=0; if(!is_numeric($config['vip'])) $config['vip']=0; $rt = $db->get_value("SELECT uid FROM pw_members WHERE uid='$config[uid]'"); if($rt){ $db->update("UPDATE pw_11rpfarm_nc SET exp = '$config[nc_exp]',reclaim= $config[reclaim] WHERE uid='$config[uid]'"); $db->update("UPDATE pw_11rpfarm_mc SET exp = '$config[mc_exp]' WHERE uid='$config[uid]'"); $db->update("UPDATE pw_11rpfarm_config SET money = '$config[money]',yb = '$config[yb]',jb = '$config[jb]',vip = '$config[vip]' WHERE uid='$config[uid]'"); adminmsg('operate_success'); }else{ adminmsg('本站没有这个用户UID'); } } include PrintHack('admin');exit; } elseif($action == "notice"){ include H_P."happyfarm/data/notice.php"; InitGP(array('step')); if($step=='ok'){ InitGP(array('config'),'P'); if($config[msg]){ include(H_P."happyfarm/data/farm_msgs.php"); $dataarray = array( '0' =>array( 'msg' =>$config[msg], 'url' =>$config[url], ) ); $msgs = $msgs?array_merge($dataarray,$msgs)dataarray; $datadb = "<?php\r\n\$msgs = array(\r\n"; foreach($msgs as $key=>$value){ $datadb .= "\t'".$key."'=>array(\r\n\t\t'msg'=>'".$value[msg]."',\r\n\t\t'url'=>'".$value[url]."',\r\n\t),\r\n"; } $datadb .= ");\r\n?>"; writeover(H_P."happyfarm/data/farm_msgs.php",$datadb); } writeover(H_P."happyfarm/data/notice.php","<?php\r\n\$notice='".$config[notice]."'\r\n?>"); } include PrintHack('admin');exit; } function escape($str) { preg_match_all("/[\x80-\xff].|[\x01-\x7f]+/",$str,$r); $ar = $r[0]; foreach($ar as $k=>$v) { if(ord($v[0]) < 128) $ar[$k] = rawurlencode($v); else $ar[$k] = "\u".bin2hex(iconv("GBK","UCS-2",$v)); } return join("",$ar); } function unescape($str) { $str = rawurldecode($str); $str = str_replace('\u','%u',$str); preg_match_all("/%u.{4}|&#x.{4};|&#d+;|.+/U",$str,$r); $ar = $r[0]; foreach($ar as $k=>$v) { if(substr($v,0,2) == "%u") $ar[$k] = iconv("UCS-2","GBK",pack("H4",substr($v,-4))); elseif(substr($v,0,3) == "&#x") $ar[$k] = iconv("UCS-2","GBK",pack("H4",substr($v,3,-1))); elseif(substr($v,0,2) == "&#") { $ar[$k] = iconv("UCS-2","GBK",pack("n",substr($v,2,-1))); } } return join("",$ar); } ?>

以上是ADMIN.PHP的··

以下是admin.htm的··


<!--<?php
include_once PrintEot('left');print <<<EOT
-->
<div style="padding:15px 0 0;"><a href="$admin_file?adminjob=hackcenter">插件中心</a> &raquo; <a href="#">运气农场</a></div>

<ul class="nav3">
<li><a href="$basename" class="two">农场全局设置</a></li>
<li><a href="$basename&action=farm" class="two">农场作物设置</a></li>
<li><a href="$basename&action=animal" class="two">牧场动物设置</a></li>
<li><a href="$basename&action=decorative" class="two">农场装饰设置</a></li>
<li><a href="$basename&action=item" class="two">农场道具设置</a></li>
<li><a href="$basename&action=user" class="two">农场用户设置</a></li>
<li><a href="$basename&action=notice" class="two">农场公告设置</a></li></ul>
<ul class="nav3">
<li><a href="http://11rp.com" target="_blank" class="two">技术支持网站</a></li>
<li><a href="http://www.rcjmgh.com/bbs/index.php" target="_blank" class="two">完美演示站点</a></li>
</ul><div class="c"></div>
<h3>提示信息(<a href="http://11rp.com" target="_blank"><font color="red">插件定制,商业版购买</font></a><a target="_blank" href="tencent://message/?uin=361515133&amp;Site=插件定制,商业版购买&amp;Menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=4:361515133:4" />QQ:361515133 (天使)</a>)</h3>
<!--
EOT;
if(empty($action)){print <<<EOT
-->
<div class="tr5">农场设置:设置农场基本参数</div>
<form method="post" action="$basename">
<input type="hidden" name="action" value="unsubmit" />
<h2>农场基本资料设定</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td>农场是否开启:</td>
<td><input type="radio" value=1 $farm_open_1 name="config[farm_open]" /> 是 <input type="radio" value="0" $farm_open_0 name="config[farm_open]" /> 否</td>
</tr>
<tr class="tr3">
                <td>允许开通农场的用户组</td>
                <td><table cellspacing="0" cellpadding="0" border="0" width="100%" align="center"><tr class="b">$usergroup</tr></table></td>
</tr>
<tr class="tr3">
                <td>开通兑换的积分类型</td>
                <td><select name="config[credit]">
                        <option value="rvrc" $rvrc_st>$db_rvrcname</option>
                        <option value="money" $money_st>$db_moneyname</option>
                        <option value="credit" $credit_st>$db_creditname</option>
                        <option value="currency" $currency_st>$db_currencyname</option>
                        </select>
                </td>
</tr>
<tr class="tr3">
                <td>金币兑换比例</td>
                <td><input type="text" name="config[credit_jb]" size="15" value="$farm_config[credit_jb]"/>一个积分可以兑换的金币数,默认为100
                </td>
</tr>
<tr class="tr3">
                <td>运气兑换比例</td>
                <td><input type="text" name="config[credit_yb]" size="15" value="$farm_config[credit_yb]"/>一个积分可以兑换的运气数,默认为0.1
                </td>
</tr>
<tr class="tr3"><td>每日获得经验上限基数:</td>
<td><input type="text" name="config[exp_maxbase]" size="15" value="$farm_config[exp_maxbase]"/>默认是200</td>
</tr>
<tr class="tr3"><td>通过帮忙获得经验上限基数:</td>
<td><input type="text" name="config[exp_base]" size="15" value="$farm_config[exp_base]"/>默认是100</td>
</tr>
<tr class="tr3"><td>帮助好友成功后获得多少金币:</td>
<td><input type="text" name="config[help_money]" size="15" value="$farm_config[help_money]"/>默认为1</td>
</tr>
<tr class="tr3"><td>帮助好友成功后获得多少经验:</td>
<td><input type="text" name="config[help_exp]" size="15" value="$farm_config[help_exp]"/>默认为2</td>
</tr>
<tr class="tr3"><td>刷虫、草、干旱、蚊子、便便的时间间隔:</td>
<td><input type="text" name="config[bad_time]" size="15" value="$farm_config[bad_time]"/>默认为25200也就是7小时</td>
</tr>
<tr class="tr3"><td>翻土时获得神秘种子的几率:</td>
<td><input type="text" name="config[farm_rand]" size="15" value="$farm_config[farm_rand]"/>默认为6,最小为1,越大几率越小</td>
</tr>
<tr class="tr3">
<td>刷新草的几率:</td>
<td><input type="text" name="config[cao_rand]" size="15" value="$farm_config[cao_rand]"/>默认为20,最小为10,值越大几率越小</td>
</tr>
<tr class="tr3">
<td>刷新虫的几率:</td>
<td><input type="text" name="config[chong_rand]" size="15" value="$farm_config[chong_rand]"/>默认为20,最小为10,值越大几率越小</td>
</tr>
<tr class="tr3">
<td>刷新干旱的几率:</td>
<td><input type="text" name="config[han_rand]" size="15" value="$farm_config[han_rand]"/>默认为20,最小为10,值越大几率越小</td>
</tr>
<tr class="tr3">
<td>狗咬人的几率:</td>
<td><input type="text" name="config[dog_rand]" size="15" value="$farm_config[dog_rand]"/>默认为10,最小为6,值越大几率大</td>
</tr>
<tr class="tr3">
<td>每天使坏的次数:</td>
<td><input type="text" name="config[bad_num]" size="15" value="$farm_config[bad_num]"/>默认为50</td>
</tr>
<tr class="tr3">
<td>每天放蚊子的次数:</td>
<td><input type="text" name="config[bad_num1]" size="15" value="$farm_config[bad_num1]"/>默认为25</td>
</tr>
<tr class="tr3">
<td>每天萝卜喂兔子次数:</td>
<td><input type="text" name="config[sfeedleft]" size="15" value="$farm_config[sfeedleft]"/>默认为20</td>
</tr>
<tr class="tr3">
<td>牧场开放VIP等级:</td>
<td><input type="text" name="config[reqYellowlevel]" size="15" value="$farm_config[reqYellowlevel]"/>默认为1</td>
</tr>
<tr class="tr3">
<td>制作化肥便便用量:</td>
<td><input type="text" name="config[dbnum]" size="15" value="$farm_config[dbnum]"/>默认为10</td>
</tr>
<tr class="tr3">
<td>制作化肥红玫瑰用量:</td>
<td><input type="text" name="config[lbnum]" size="15" value="$farm_config[lbnum]"/>默认为10</td>
</tr>
<tr class="tr3">
<td>制作化肥消耗金币数:</td>
<td><input type="text" name="config[jbnum]" size="15" value="$farm_config[jbnum]"/>默认为10000</td>
</tr>
<tr class="tr3">
<td>每天制作化肥次数:</td>
<td><input type="text" name="config[hfnum]" size="15" value="$farm_config[hfnum]"/>默认为1,不要超过99次啊,超过要出错的!</td>
</tr>
<tr class="tr3">
<td>农场好友设置:</td>
<td><input type="text" name="config[friend]" size="5" value="$farm_config[friend]"/>设为1表示所有农场成员是好友,设为0表示按照论坛圈子里的朋友是好友</td>
</tr>
<tr class="tr3">
<td>默认好友UID:</td>
<td><input type="text" name="config[frienduid]" size="5" value="$farm_config[frienduid]"/>如果已经设所有农场成员为好友就留空</td>
</tr>
</table>
<br /><center><input type="submit" class="btn" value="提 交" /></center></form><br />
<!--
EOT;
}elseif($action=='item'){print <<<EOT
-->
<div class="tr5">农场道具设置:编辑道具相关数据</div>
<!--
EOT;
if($step==''){print <<<EOT
-->
<h2>所有道具列表</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td>道具ID</td><td>名称</td><td>类型</td><td>有效期</td><td width="30%">相关说明</td><td>金币购买价格</td><td>运气购买价格<br/>(VIP优惠价)</td><td>开放出售</td><td>操作</td>
</tr>
<!--
EOT;
foreach($_0[Toolstype] as $key=>$value){
$value[tName] =unescape($value[tName]) ;
$value[depict] =unescape($value[depict]) ;
$value[effect] = round($value[effect]/3600,1);
$value[saleOut]?$value[saleOut]="否"value[saleOut]="是";
print <<<EOT
-->
<tr class="tr3"><td>$value[tId]</td><td>$value[tName]</td><td>$value[type]</td><td>$value[effect]小时</td><td>$value[depict]</td><td>$value[price]</td><td>$value[FBPrice](<font color=green>$value[YFBPrice]</font>)</td><td>$value[saleOut]</td><td><a href="$basename&action=item&step=edittools&cid=$key" class="two">编辑</a></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<!--
EOT;
}elseif($step=='edittools'){
$value=$_0[Toolstype][$cid];
$value[tName] =unescape($value[tName]) ;
$value[depict] =unescape($value[depict]) ;
$value[effect] = round($value[effect]/3600,1);
$value[saleOut]?$sell_open_0 = 'checked'sell_open_1='checked' ;print <<<EOT
-->
<h2>编辑道具:{$value[itemName]} 的相关参数</h2>
<form method="post" action="$basename">
<input type="hidden" name="action" value="item" />
<input type="hidden" name="step" value="editok" />
<input type="hidden" name="cid" value="$cid" />
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td>道具ID</td><td><input type="text" name="config[tId]" size="20" value="$value[tId]" readonly/></td></tr>
<tr class="tr3"><td>道具名称</td><td><input type="text" name="config[tName]" size="20" value="$value[tName]" /></td></tr>
<tr class="tr3"><td>道具类型</td><td><input type="text" name="config[type]" size="10" value="$value[type]" readonly/></td></tr>
<tr class="tr3"><td>有效期</td><td><input type="text" name="config[effect]" size="20" value="$value[effect]" />小时,只有化肥设置有效</td></tr>
<tr class="tr3"><td>相关说明</td><td><textarea rows="3" name="config[depict]" cols="60">$value[depict]</textarea></td></tr>
<tr class="tr3"><td>金币购买价格</td><td><input type="text" name="config[price]" size="20" value="$value[price]" /></td></tr>
<tr class="tr3"><td>运气购买价格</td><td><input type="text" name="config[FBPrice]" size="20" value="$value[FBPrice]" /></td></tr>
<tr class="tr3"><td>VIP优惠价</td><td><input type="text" name="config[YFBPrice]" size="20" value="$value[YFBPrice]" /></td></tr>
<tr class="tr3"><td>是否开放出售</td><td><input type="radio" value="0" $sell_open_1 name="config[saleOut]" /> 是 <input type="radio" value="1" $sell_open_0 name="config[saleOut]" /> 否</td></td></tr>
</table>
<br /><center><input type="submit" class="btn" value="提 交" /></center></form><br />
<!--
EOT;
}print <<<EOT
-->
<br /><br />
<!--
EOT;
}elseif($action=='decorative'){print <<<EOT
-->
<div class="tr5">农场装饰设置:编辑装饰相关数据</div>
<!--
EOT;
if($step==''){print <<<EOT
-->
<h2>所有装饰列表</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td>装饰ID</td><td>名称</td><td>装饰类型</td><td>有效期</td><td>相关说明</td><td>金币购买价格</td><td>运气购买价格(VIP优惠价)</td><td>购买获得经验</td><td>操作</td>
</tr>
<!--
EOT;
foreach($_0[itemtype] as $key=>$value){
$value[itemName] =unescape($value[itemName]) ;
$value[itemDesc] =unescape($value[itemDesc]) ;
$value[itemValidTime] = floor($value[itemValidTime]/86400);
print <<<EOT
-->
<tr class="tr3"><td>$value[itemId]</td><td>$value[itemName]</td><td>$value[itemType]</td><td>$value[itemValidTime]天</td><td>$value[itemDesc]</td><td>$value[price]</td><td>$value[FBPrice](<font color=green>$value[YFBPrice]</font>)</td><td>$value[exp]</td><td><a href="$basename&action=decorative&step=edititem&cid=$value[itemId]" class="two">编辑</a></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<!--
EOT;
}elseif($step=='edititem'){
$value=$_0[itemtype][$cid];
$value[itemName] =unescape($value[itemName]) ;
$value[itemDesc] =unescape($value[itemDesc]) ;
$value[itemValidTime] = floor($value[itemValidTime]/86400);print <<<EOT
-->
<h2>编辑装饰:{$value[itemName]} 的相关参数</h2>
<form method="post" action="$basename">
<input type="hidden" name="action" value="decorative" />
<input type="hidden" name="step" value="editok" />
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td>CID</td><td><input type="text" name="config[itemId]" size="20" value="$value[itemId]" readonly/></td></tr>
<tr class="tr3"><td>装饰名称</td><td><input type="text" name="config[itemName]" size="20" value="$value[itemName]" /></td></tr>
<tr class="tr3"><td>装饰类型</td><td><input type="text" name="config[itemType]" size="10" value="$value[itemType]" readonly/>1为背景,2为房子,3为围墙,4围狗屋</td></tr>
<tr class="tr3"><td>有效期</td><td><input type="text" name="config[itemValidTime]" size="20" value="$value[itemValidTime]" /></td></tr>
<tr class="tr3"><td>相关说明</td><td><input type="text" name="config[itemDesc]" size="20" value="$value[itemDesc]" /></td></tr>
<tr class="tr3"><td>金币购买价格</td><td><input type="text" name="config[price]" size="20" value="$value[price]" /></td></tr>
<tr class="tr3"><td>运气购买价格</td><td><input type="text" name="config[FBPrice]" size="20" value="$value[FBPrice]" /></td></tr>
<tr class="tr3"><td>VIP优惠价</td><td><input type="text" name="config[YFBPrice]" size="20" value="$value[YFBPrice]" /></td></tr>
<tr class="tr3"><td>购买获得经验</td><td><input type="text" name="config[exp]" size="20" value="$value[exp]" readonly/></td></tr>
</table>
<br /><center><input type="submit" class="btn" value="提 交" /></center></form><br />
<!--
EOT;
}print <<<EOT
-->
<br /><br />
<!--
EOT;
}elseif($action=='animal'){print <<<EOT
-->
<div class="tr5">牧场动物设置:编辑添加动物相关数据</div>
<h2>从(happyfarm/require/animal.php)导入动物相关数据:<a href="$basename&action=animalup" class="two"><font color=red>开始导入</font></a></h2>
<!--
EOT;
if($step==''){print <<<EOT
-->
<h2>牧场所有动物列表</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td>CID</td><td>名称</td><td>成长时间</td><td>养植等级</td><td>产量</td><td>产物价格</td><td>动物价格</td><td>幼崽价格</td><td>收获经验</td><td>生产时间</td><td>生产间隔</td><td>消耗饲料</td><td>操作</td>
</tr>
<!--
EOT;
foreach($_0[animaltype] as $key=>$value){
$value[cName] =unescape($value[cName]) ;
$value[maturingTime] = floor($value[maturingTime]/3600);
$value[procreation] = floor($value[procreation]/3600);
$value[cub] = floor($value[cub]/3600);

print <<<EOT
-->
<tr class="tr3">
<td>$value[cId]</td><td>$value[cName]</td><td>$value[maturingTime]小时</td><td>$value[cLevel]</td><td>$value[output]</td><td>$value[byproductprice]</td><td>$value[productprice]</td><td>$value[price]</td><td>$value[harvestbExp]</td><td>$value[procreation]小时</td><td>$value[cub]小时</td><td>$value[consum]</td><td><a href="$basename&action=animal&step=editanimal&cid=$key" class="two">编辑动物</a></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<!--
EOT;
}elseif($step=='editanimal'){
$value=$_0[animaltype][$cid];
$val = $_0[animalname][$cid+10000];
$dll = unescape($_0[animalname][$cid][liangci]);
$val[liangci] = unescape($val[liangci]);
$val[act] = unescape($val[act]);
$val[name] = unescape($val[name]);
$value[cName] =unescape($value[cName]) ;
$value[maturingTime] = floor($value[maturingTime]/3600);
$value[procreation] = floor($value[procreation]/3600);
$value[cub] = floor($value[cub]/3600);print <<<EOT
-->
<h2>编辑动物:{$value[cName]} 的相关参数</h2>
<form method="post" action="$basename">
<input type="hidden" name="action" value="animal" />
<input type="hidden" name="step" value="editok" />
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td>CID</td><td><input type="text" name="config[cId]" size="10" value="$value[cId]" readonly/></td><td>名称</td><td><input type="text" name="config[cName]" size="10" value="$value[cName]" /></td></tr>
<tr class="tr3"><td>成长时间</td><td><input type="text" name="config[maturingTime]" size="10" value="$value[maturingTime]" />小时</td>
<td>养植等级</td><td><input type="text" name="config[cLevel]" size="10" value="$value[cLevel]" /></td></tr>
<tr class="tr3"><td>产量</td><td><input type="text" name="config[output]" size="10" value="$value[output]" /></td>
<td>产物价格</td><td><input type="text" name="config[byproductprice]" size="10" value="$value[byproductprice]" /></td></tr>
<tr class="tr3"><td>动物价格</td><td><input type="text" name="config[productprice]" size="10" value="$value[productprice]" /></td>
<td>幼崽价格</td><td><input type="text" name="config[price]" size="10" value="$value[price]" /></td></tr>
<tr class="tr3"><td>收获经验</td><td><input type="text" name="config[harvestbExp]" size="10" value="$value[harvestbExp]" readonly/></td>
<td>生产时间</td><td><input type="text" name="config[procreation]" size="10" value="$value[procreation]" readonly/>小时</td></tr>
<tr class="tr3"><td>生产间隔</td><td><input type="text" name="config[cub]" size="10" value="$value[cub]" readonly/>小时</td>
<td>4小时消耗饲料</td><td><input type="text" name="config[consum]" size="10" value="$value[consum]" /></td></tr>
<tr class="tr3"><td>动物量词</td><td><input type="text" name="config1[dll]" size="10" value="$dll" /></td>
<td>产品名称</td><td><input type="text" name="config1[name]" size="10" value="$val[name]" /></td></tr>
<tr class="tr3"><td>生产动作</td><td><input type="text" name="config1[act]" size="10" value="$val[act]" /></td>
<td>产品量词</td><td><input type="text" name="config1[liangci]" size="10" value="$val[liangci]" /></td></tr>
</table>
<br /><center><input type="submit" class="btn" value="提 交" /></center></form><br />
<!--
EOT;
}print <<<EOT
-->
<br /><br />
<!--
EOT;
}elseif($action=='farm'){print <<<EOT
-->
<div class="tr5">农场作物设置:编辑添加农作物相关数据</div>
<h2>从(happyfarm/require/farm.php)导入农作物相关数据:<a href="$basename&action=farmup" class="two"><font color=red>开始导入</font></a></h2>
<form method="post" action="$basename">
<input type="hidden" name="action" value="farm" />
<input type="hidden" name="step" value="randseed" />
<h2><div>隐藏种子ID,用英文逗号(,)隔开:<textarea rows="3" name="randseeduid" cols="60">$randseeduid</textarea>&nbsp;&nbsp;<input type="submit" name="submitnc_user" class="button" value="确定改动" /></div></h2>
</form>
<!--
EOT;
if($step==''){print <<<EOT
-->
<h2>农场所有农作物列表</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td>CID</td><td>名称</td><td>几季作物</td><td>种植等级</td><td>产量</td><td>出卖价</td><td>种子价格</td><td>收获经验</td><td>成熟期</td><td>操作</td>
</tr>
<!--
EOT;
foreach($_0[cropstype] as $key=>$value){
$value[cName] =unescape($value[cName]) ;
$value[growthCycle] = floor($value[growthCycle]/3600);

print <<<EOT
-->
<tr class="tr3">
<td>$value[cId]</td><td>$value[cName]</td><td>$value[maturingTime]</td><td>$value[cLevel]</td><td>$value[output]</td><td>$value[sale]</td><td>$value[price]</td><td>$value[cropExp]</td><td>$value[growthCycle] 小时</td><td><a href="$basename&action=farm&step=editfarm&cid=$key" class="two">编辑作物</a></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<!--
EOT;
}elseif($step=='editfarm'){
$value=$_0[cropstype][$cid];
$value[cName] =unescape($value[cName]) ;
$value[growthCycle] = floor($value[growthCycle]/3600);print <<<EOT
-->
<h2>编辑{$value[cName]}的相关参数</h2>
<form method="post" action="$basename">
<input type="hidden" name="action" value="farm" />
<input type="hidden" name="step" value="editok" />
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td>CID</td><td><input type="text" name="config[cId]" size="10" value="$value[cId]" readonly/></td></tr>
<tr class="tr3"><td>名称</td><td><input type="text" name="config[cName]" size="10" value="$value[cName]" /></td></tr>
<tr class="tr3"><td>几季作物</td><td><input type="text" name="config[maturingTime]" size="10" value="$value[maturingTime]" /></td></tr>
<tr class="tr3"><td>种植等级</td><td><input type="text" name="config[cLevel]" size="10" value="$value[cLevel]" /></td></tr>
<tr class="tr3"><td>产量</td><td><input type="text" name="config[output]" size="10" value="$value[output]" /></td></tr>
<tr class="tr3"><td>出卖价</td><td><input type="text" name="config[sale]" size="10" value="$value[sale]" /></td></tr>
<tr class="tr3"><td>种子价格</td><td><input type="text" name="config[price]" size="10" value="$value[price]" /></td></tr>
<tr class="tr3"><td>收获经验</td><td><input type="text" name="config[cropExp]" size="10" value="$value[cropExp]" /></td></tr>
<tr class="tr3"><td>成熟期</td><td><input type="text" name="config[growthCycle]" size="10" value="$value[growthCycle]" readonly/>小时</td></tr>
</table>
<br /><center><input type="submit" class="btn" value="提 交" /></center></form><br />
<!--
EOT;
}print <<<EOT
-->
<br /><br />
<!--
EOT;
}elseif($action=='user'){print <<<EOT
-->
<div class="tr5">农场用户资料设置:编辑用户的相关数据</div>
<form method="post" action="$basename">
<input type="hidden" name="action" value="user" />
<input type="hidden" name="step" value="submitnc_user" />
<h2><div>用户UID:&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="uid" size="10" value="$userdb[uid]" onfocus="if (value =='用户UID'){value =''}" onblur="if (value ==''){value='用户UID'}"/>&nbsp;&nbsp;<input type="submit" name="submitnc_user" class="button" value="确定查看该用户" />&nbsp;&nbsp;(已有$rt[sum] 用户有了自己的运气农场)</div><div class="nav3">
<a href="$basename&action=user&step=submitnc_listall" class="two">全体农场主列表</a></div></h2>
</form><br />

<!--
EOT;
if(!$step||$step=='submitnc_user'){print <<<EOT
-->
<form method="post" action="$basename">
<input type="hidden" name="action" value="user" />
<input type="hidden" name="step" value="submitnc_ok" />
<h2>用户资料修改</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td>用户UID(不是用户名哦):</td>
<td><input type="text" name="config[uid]" size="25" value="$userdb[uid]" onfocus="if (value =='用户UID'){value =''}" onblur="if (value ==''){value='用户UID'}"/></td>
</tr>
<tr class="tr3"><td>农场经验:</td>
<td><input type="text" id="nc_exp"  name="config[nc_exp]" size="25" value="$userdb[nc_exp]" onfocus="if (value =='输入经验数量'){value =''}" onblur="if (value ==''){value='输入经验数量'}"/><font size='3'>农场等级:$userdb[nc_level]</font></td>
</tr>
<tr class="tr3"><td>地块数量:</td>
<td><input type="text" id="reclaim"  name="config[reclaim]" size="25" value="$userdb[reclaim]" onfocus="if (value =='输入地块数量'){value =''}" onblur="if (value ==''){value='输入地块数量'}"/></td>
</tr>
<tr class="tr3"><td>牧场经验:</td>
<td><input type="text" id="mc_exp"  name="config[mc_exp]" size="25"  value="$userdb[mc_exp]" onfocus="if (value =='输入经验数量'){value =''}" onblur="if (value ==''){value='输入经验数量'}"/><font size='3'>牧场等级:$userdb[mc_level]</font></td>
</tr>
<tr class="tr3"><td>金币:</td>
<td><input type="text" id="money"  name="config[money]" size="25" value="$userdb[money]" onfocus="if (value =='输入金币数量'){value =''}" onblur="if (value ==''){value='输入金币数量'}"/></td>
</tr>
<tr class="tr3"><td> Y币:</td>
<td><input type="text" id="yb"  name="config[yb]" size="25" value="$userdb[yb]" onfocus="if (value =='输入Y币数量'){value =''}" onblur="if (value ==''){value='输入Y币数量'}"/></td>
</tr>
<tr class="tr3">
<td> J币:</td>
<td><input type="text" id="jb"  name="config[jb]" size="25" value="$userdb[jb]" onfocus="if (value =='输入J币数量'){value =''}" onblur="if (value ==''){value='输入J币数量'}"/></td>
</tr>
<tr class="tr3">
<td> VIP等级:</td>
<td><input type="text" id="vip"  name="config[vip]" size="25" value="$userdb[vip]" onfocus="if (value =='输入VIP等级'){value =''}" onblur="if (value ==''){value='输入VIP等级'}"/></td>
</tr>
</table>
<br /><center><input type="submit" class="btn" value="提 交" /></center></form><br />
<!--
EOT;
}elseif($step=='submitnc_listall'){print <<<EOT
-->
<h2>农场主列表资料(点击用户名可编辑用户数据)</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td>用户UID</td><td>用户名</td><td>金币</td><td>运气</td><td>VIP等级</td><td>农场等级</td><td>农场经验</td><td>开垦地块</td><td>牧场等级</td><td>牧场经验</td></tr>
<!--
EOT;
foreach($userdb as $value){print <<<EOT
-->
<tr class="tr3"><td>$value[uid]</td><td><a href="$basename&action=user&step=submitnc_user&uid=$value[uid]" class="two">$value[username]</a></td><td>$value[money]</td><td>$value[yb]</td><td>$value[vip]</td><td>$value[nc_level]</td><td>$value[nc_exp]</td><td>$value[reclaim]</td><td>$value[mc_level]</td><td>$value[mc_exp]</td></tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<div class="cc">$pages</div><br/><br/>
<!--
EOT;
}}elseif($action=='notice'){print <<<EOT
-->
<div class="tr5">农场公告和系统消息设置</div>
<form method="post" action="$basename">
<input type="hidden" name="action" value="notice" />
<input type="hidden" name="step" value="ok" />
<h2>农场公告消息设定</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td>农场公告:</td>
<td><textarea rows="6" name="config[notice]" cols="80">$notice</textarea></td>
</tr>
<tr class="tr3"><td>农场消息:</td>
<td>消&nbsp;&nbsp;息&nbsp;&nbsp;主&nbsp;&nbsp;题:<input type="text" name="config[msg]" size="55" value=""/>没有新消息留空<br/>消息链接地址:<input type="text" name="config[url]" size="55" value=""/></td>
</tr>
</table>
<br /><center><input type="submit" class="btn" value="提 交" /></center></form><br />
<!--
EOT;
}include_once PrintEot('adminbottom');
?>-->
eneas1 发表于 2010-2-11 06:54:45 | 显示全部楼层
沙发吗?哈哈哈哈
回复

使用道具 举报

4wj2af 发表于 2010-2-11 10:53:23 | 显示全部楼层
留名关注      1
回复

使用道具 举报

alao 发表于 2010-2-11 10:55:16 | 显示全部楼层
先观察下············
回复

使用道具 举报

zybb1 发表于 2010-2-11 15:29:49 | 显示全部楼层
已实现
回复

使用道具 举报

wshsky 发表于 2010-2-11 15:49:23 | 显示全部楼层
我潘你老母,你麦吉系必
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-11-18 08:39 , Processed in 0.035663 second(s), 6 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表