-
- 需要先覆盖群里面的队列flash,以下是程序修改部分。
- 1.添加数据库字段
- alter table `uchome_plug_newfarm` add column `parade` text not null;
- 2.在newmc最后面添加这段代码:
- if( $_REQUEST['mod'] == "cgi_set_parade" ) {
- $parade['pinfo'] = $_REQUEST['pinfo'];
- $parade['pid'] = $_REQUEST['pid'];
- $parade = json_encode($parade);
- $parade = str_replace( ""{", "{", $parade );
- $parade = str_replace( "}"", "}", $parade );
- $parade = str_replace( "\\u", "\\\\u", $parade );
- $_SGLOBAL['db']->query( "UPDATE ".tname( "plug_newfarm" )." set parade='".$parade."' where uid=".intval( $_REQUEST['uIdx']));
- }
- if( $_REQUEST['mod'] == "cgi_get_parade" ) {
- $parade = $_SGLOBAL['db']->result($_SGLOBAL['db']->query( "select parade from ".tname( "plug_newfarm" )." where uid=".intval( $_SGLOBAL['supe_uid'])),0);
- $parade = (array) json_decode($parade);
- if(empty($parade[pid])) $parade[pid]=0;
- echo "{"i":"".$parade[pinfo]."","p":".$parade[pid].","v":1}";
- }
- 3. 在newmc里面查找 if ( $_REQUEST['mod'] == "cgi_enter" || $_REQUEST['mod'] == "cgi_enter?" )
- 查找
- SELECT money,animal,mc_exp,wenz FROM
- 改成
- SELECT money,animal,mc_exp,wenzi,parade FROM
- 查找
- SELECT money,animal,mc_exp,mc_taskid,wenzi FROM
- 改成
- SELECT money,animal,mc_exp,mc_taskid,wenzi,parade FROM
- 跟着后面找到 $needfood = 0; (有两处 ,都要加)
- 在上面添加
- $parade = ( array )json_decode( $list[0][parade] );
- if(empty($parade['pid'])) {
- $parade['pid']=0;
- }
- 查找 (也有两处 都要加)
- "weather":{"weatherDesc":"晴天","weatherId":1}
- 在后面加上
- ,"parade":{"i":"".$parade[pinfo]."","p":".$parade[pid].","v":1}
复制代码
|