似乎SAM老大打包的时候放错了个文件,农场根目录下的(不是newfarm目录下的)newfarm.php有问题,导致大家MC_LOG出错!
用下面的替换一下试试看!
12.25补丁包中的newfarm.php- <?php
- /*********************/
- /* */
- /* Version : 5.1.0 */
- /* Author : RM */
- /* Comment : 071223 */
- /* */
- /*********************/
- include_once( "./common.php" );
- require_once('./source/function_common.php');
- $uid=$_SGLOBAL['supe_uid'];
- //--------------------------------------------------------------------------------------
- session_start();
- $_SESSION['SessUID']=$uid;
- $acs = array('index','invite','invite1','set','newfarm');
- $ac = (!empty($_GET['ac']) && in_array($_GET['ac'], $acs)) ? $_GET['ac'] : 'newfarm';
- //----------------------------------------------------------------------------------------
- if ( empty( $_SGLOBAL['supe_uid'] ) )
- {
- showmessage( "请先登录后,再访问", "do.php?ac=login" );
- }
- $newfarm = "yes";
- $maxuid = $_SGLOBAL['db']->result( $_SGLOBAL['db']->query( "SELECT uid FROM ".tname( "plug_newfarm" )." where uid=".$_SGLOBAL['supe_uid'] ), 0 );
- if ( $maxuid == NULL )
- {
- $farmlandstatus = "{"farmlandstatus":[{"a":2,"b":6,"f":0,"g":0,"h":1,"i":[],"j":0,"k":16,"l":9,"m":16,"n":"2","o":0,"p":[],"q":1251315720,"r":1251351720,"s":0,"t":0,"u":0},{"a":2,"b":3,"f":1,"g":0,"h":1,"i":[],"j":0,"k":16,"l":9,"m":16,"n":"2","o":0,"p":[],"q":1251337325,"r":1251351725,"s":0,"t":0,"u":0},{"a":2,"b":3,"f":0,"g":0,"h":0,"i":[],"j":0,"k":16,"l":9,"m":16,"n":"2","o":0,"p":[],"q":1251337325,"r":1251351725,"s":0,"t":0,"u":0},{"a":2,"b":3,"f":0,"g":2,"h":1,"i":[],"j":0,"k":16,"l":9,"m":16,"n":"2","o":0,"p":[],"q":1251326525,"r":1251351725,"s":0,"t":0,"u":0},{"a":2,"b":7,"f":0,"g":0,"h":1,"i":[],"j":0,"k":16,"l":9,"m":16,"n":"2","o":0,"p":[],"q":0,"r":1251351725,"s":0,"t":0,"u":0},{"a":2,"b":7,"f":0,"g":0,"h":1,"i":[],"j":0,"k":16,"l":9,"m":16,"n":"2","o":0,"p":[],"q":0,"r":1251351725,"s":0,"t":0,"u":0},{"a":0,"b":0,"f":0,"g":0,"h":1,"i":[],"j":0,"k":0,"l":0,"m":0,"n":"2","o":0,"p":[],"q":0,"r":1251351725,"s":0,"t":0,"u":0},{"a":0,"b":0,"f":0,"g":0,"h":1,"i":[],"j":0,"k":0,"l":0,"m":0,"n":"2","o":0,"p":[],"q":0,"r":1251351725,"s":0,"t":0,"u":0},{"a":0,"b":0,"f":0,"g":0,"h":1,"i":[],"j":0,"k":0,"l":0,"m":0,"n":"2","o":0,"p":[],"q":0,"r":1251351725,"s":0,"t":0,"u":0},{"a":0,"b":0,"f":0,"g":0,"h":1,"i":[],"j":0,"k":0,"l":0,"m":0,"n":"2","o":0,"p":[],"q":0,"r":1251351725,"s":0,"t":0,"u":0},{"a":0,"b":0,"f":0,"g":0,"h":1,"i":[],"j":0,"k":0,"l":0,"m":0,"n":"2","o":0,"p":[],"q":0,"r":1251351725,"s":0,"t":0,"u":0},{"a":0,"b":0,"f":0,"g":0,"h":1,"i":[],"j":0,"k":0,"l":0,"m":0,"n":"2","o":0,"p":[],"q":0,"r":1251351725,"s":0,"t":0,"u":0},{"a":0,"b":0,"f":0,"g":0,"h":1,"i":[],"j":0,"k":0,"l":0,"m":0,"n":"2","o":0,"p":[],"q":0,"r":1251351725,"s":0,"t":0,"u":0},{"a":0,"b":0,"f":0,"g":0,"h":1,"i":[],"j":0,"k":0,"l":0,"m":0,"n":"2","o":0,"p":[],"q":0,"r":1251351725,"s":0,"t":0,"u":0},{"a":0,"b":0,"f":0,"g":0,"h":1,"i":[],"j":0,"k":0,"l":0,"m":0,"n":"2","o":0,"p":[],"q":0,"r":1251351725,"s":0,"t":0,"u":0},{"a":0,"b":0,"f":0,"g":0,"h":1,"i":[],"j":0,"k":0,"l":0,"m":0,"n":"2","o":0,"p":[],"q":0,"r":1251351725,"s":0,"t":0,"u":0},{"a":0,"b":0,"f":0,"g":0,"h":1,"i":[],"j":0,"k":0,"l":0,"m":0,"n":"2","o":0,"p":[],"q":0,"r":1251351725,"s":0,"t":0,"u":0},{"a":0,"b":0,"f":0,"g":0,"h":1,"i":[],"j":0,"k":0,"l":0,"m":0,"n":"2","o":0,"p":[],"q":0,"r":1251351725,"s":0,"t":0,"u":0}]}";
- $farmlandstatus = ( array )json_decode( $farmlandstatus );
- foreach ( $farmlandstatus[farmlandstatus] as $key => $value )
- {
- if ( $key == 0 )
- {
- $value->q = $_SGLOBAL['timestamp'] - 36000;
- }
- if ( $key == 1 )
- {
- $value->q = $_SGLOBAL['timestamp'] - 14400;
- }
- if ( $key == 2 )
- {
- $value->q = $_SGLOBAL['timestamp'] - 14400;
- }
- if ( $key == 3 )
- {
- $value->q = $_SGLOBAL['timestamp'] - 25200;
- }
- }
- $farmlandstatus = json_encode( $farmlandstatus );
-
- //背包
- $package = "{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"1":0,"14":0,"15":0,"18":0,"19":0,"13":0,"23":0,"26":0,"27":0,"29":0,"31":0,"33":0,"34":0,"35":0,"36":0,"12":0,"16":0,"17":0,"20":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"21":0,"22":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"2001":0,"2002":0,"2003":0,"40":0,"24":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"25":0}";
-
- //肥料
- $fertilizer = "{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"501":0,"9":0}";
-
- //装饰
- $decorative = "{"1":{"1":{"status":1,"validtime":0},"11":{"status":0,"validtime":1},"21":{"status":0,"validtime":1},"31":{"status":0,"validtime":1},"36":{"status":0,"validtime":1},"41":{"status":0,"validtime":1},"46":{"status":0,"validtime":1},"51":{"status":0,"validtime":1},"56":{"status":0,"validtime":1},"61":{"status":0,"validtime":1},"66":{"status":0,"validtime":1},"71":{"status":0,"validtime":1},"76":{"status":0,"validtime":1}},"2":{"2":{"status":1,"validtime":0},"12":{"status":0,"validtime":1},"22":{"status":0,"validtime":1},"32":{"status":0,"validtime":1},"37":{"status":0,"validtime":1},"42":{"status":0,"validtime":1},"47":{"status":0,"validtime":1},"52":{"status":0,"validtime":1},"57":{"status":0,"validtime":1},"62":{"status":0,"validtime":1},"67":{"status":0,"validtime":1},"72":{"status":0,"validtime":1},"77":{"status":0,"validtime":1}},"3":{"3":{"status":1,"validtime":0},"13":{"status":0,"validtime":1},"23":{"status":0,"validtime":1},"33":{"status":0,"validtime":1},"38":{"status":0,"validtime":1},"43":{"status":0,"validtime":1},"48":{"status":0,"validtime":1},"53":{"status":0,"validtime":1},"58":{"status":0,"validtime":1},"63":{"status":0,"validtime":1},"68":{"status":0,"validtime":1},"73":{"status":0,"validtime":1},"78":{"status":0,"validtime":1}},"4":{"4":{"status":1,"validtime":0},"14":{"status":0,"validtime":1},"24":{"status":0,"validtime":1},"34":{"status":0,"validtime":1},"39":{"status":0,"validtime":1},"44":{"status":0,"validtime":1},"49":{"status":0,"validtime":1},"54":{"status":0,"validtime":1},"59":{"status":0,"validtime":1},"64":{"status":0,"validtime":1},"69":{"status":0,"validtime":1},"74":{"status":0,"validtime":1},"79":{"status":0,"validtime":1}}}";
-
- //宠物
- $dog = "{"1":{"id":8888,"dogValidTime":1,"status":0,"dogFeedTime":0,"dogUnWorkTime":0},"2":{"id":8889,"dogValidTime":0,"status":0,"dogFeedTime":0,"dogUnWorkTime":0},"3":{"id":8890,"dogValidTime":0,"status":0,"dogFeedTime":0,"dogUnWorkTime":0},"4":{"id":8891,"dogValidTime":0,"status":0,"dogFeedTime":0,"dogUnWorkTime":0},"5":{"id":8892,"dogValidTime":0,"status":0,"dogFeedTime":0,"dogUnWorkTime":0},"6":{"id":8893,"dogValidTime":0,"status":0,"dogFeedTime":0,"dogUnWorkTime":0},"7":{"id":8894,"dogValidTime":0,"status":0,"dogFeedTime":0,"dogUnWorkTime":0},"8":{"id":8895,"dogValidTime":0,"status":0,"dogFeedTime":0,"dogUnWorkTime":0},"9":{"id":8896,"dogValidTime":0,"status":0,"dogFeedTime":0,"dogUnWorkTime":0},"10":{"id":8897,"dogValidTime":0,"status":0,"dogFeedTime":0,"dogUnWorkTime":0},"11":{"id":8898,"dogValidTime":0,"status":0,"dogFeedTime":0,"dogUnWorkTime":0},"12":{"id":8899,"dogValidTime":0,"status":0,"dogFeedTime":0,"dogUnWorkTime":0}}";
-
- //花束
- $nosegay = "{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"2001":0,"2002":0,"2003":0,"3001":0,"3002":0,"3003":0,"3004":0,"3005":0}";
-
- //消息
- $message = "{"a":[],"b":[],"c":[],"d":[],"e":[]}";
-
- //牧场动物
- $animal = "{"animalfood":20,"animalfeedtime":".$_SGLOBAL['timestamp'].","item1":10111,"item2":10221,"item3":10330,"item4":10441,"animal":[{"buyTime":1244817632,"cId":1002,"postTime":0,"totalCome":0,"tou":"","special":0},{"buyTime":0,"cId":0,"postTime":0,"totalCome":0,"tou":"","special":0},{"buyTime":0,"cId":0,"postTime":0,"totalCome":0,"tou":"","special":0},{"buyTime":0,"cId":0,"postTime":0,"totalCome":0,"tou":"","special":0},{"buyTime":0,"cId":0,"postTime":0,"totalCome":0,"tou":"","special":0},{"buyTime":0,"cId":0,"postTime":0,"totalCome":0,"tou":"","special":0},{"buyTime":0,"cId":0,"postTime":0,"totalCome":0,"tou":"","special":0},{"buyTime":0,"cId":0,"postTime":0,"totalCome":0,"tou":"","special":0},{"buyTime":0,"cId":0,"postTime":0,"totalCome":0,"tou":"","special":0},{"buyTime":0,"cId":0,"postTime":0,"totalCome":0,"tou":"","special":0},{"buyTime":0,"cId":0,"postTime":0,"totalCome":0,"tou":"","special":0},{"buyTime":0,"cId":0,"postTime":0,"totalCome":0,"tou":"","special":0},{"buyTime":0,"cId":0,"postTime":0,"totalCome":0,"tou":"","special":0},{"buyTime":0,"cId":0,"postTime":0,"totalCome":0,"tou":"","special":0},{"buyTime":0,"cId":0,"postTime":0,"totalCome":0,"tou":"","special":0},{"buyTime":0,"cId":0,"postTime":0,"totalCome":0,"tou":"","special":0},{"buyTime":0,"cId":0,"postTime":0,"totalCome":0,"tou":"","special":0},{"buyTime":0,"cId":0,"postTime":0,"totalCome":0,"tou":"","special":0}]}";
-
- //牧场背包
- $mc_package = "{"1001":0,"1002":0,"1003":0,"1004":0,"1005":0,"1006":0,"1007":0,"1501":0,"1502":0,"1503":0,"1504":0,"1505":0,"1008":0,"1009":0,"11001":0,"11002":0,"11003":0,"11004":0,"11005":0,"11006":0,"11501":0,"11502":0,"11503":0,"11504":0,"11505":0,"11008":0,"11009":0,"1506":0}";
-
- $_SGLOBAL['db']->query( "INSERT INTO ".tname( "plug_newfarm" )." (uid,farmlandstatus,package,fertilizer,decorative,fruit,dog,nosegay,message,animal,mc_package) VALUES(".$_SGLOBAL['supe_uid'].",'".$farmlandstatus."','".$package."','".$fertilizer."','".$decorative."','".$package."','".$dog."','".$nosegay."','".$message."','".$animal."','".$mc_package."')" );
- include_once( S_ROOT."./source/function_cp.php" );
- $icon = "farm";
- $title_template = "{actor} 添加了 <a href="newfarm.php">紫贝农场</a> 这个游戏。";
- $body_general = "做农民最光荣,做紫贝农场的农民更光荣";
- feed_add( $icon, $title_template, NULL, NULL, NULL, $body_general );
- }
- $_TPL['titles'] = array(
- $space['username'],
- "紫贝农场"
- );
- //include( template( "newfarm" ) );
- //--------------------------------------------------------------------------------------
- include_once(S_ROOT."./newfarm/{$ac}.php");
- //----------------------------------------------------------------------------------------
- ?>
复制代码 |