1# freeznet - //隐藏事件发布 function feed_add_anonymous($icon, $title_template='', $title_data=array(), $body_template='', $body_data=array(), $body_general='', $images=array(), $image_links=array(), $target_ids='', $friend='', $appid='', $returnid=0) { global $_SGLOBAL; if(empty($appid)) { if(is_numeric($icon)) { $appid = 0; } else { $appid = UC_APPID;//本地 } } $feedarr = array( 'appid' => $appid, 'icon' => $icon, 'uid' => 0, 'username' => $_SGLOBAL['supe_username'], 'dateline' => $_SGLOBAL['timestamp'], 'title_template' => $title_template, 'body_template' => $body_template, 'body_general' => $body_general, 'image_1' => empty($images[0])?'':$images[0], 'image_1_link' => empty($image_links[0])?'':$image_links[0], 'image_2' => empty($images[1])?'':$images[1], 'image_2_link' => empty($image_links[1])?'':$image_links[1], 'image_3' => empty($images[2])?'':$images[2], 'image_3_link' => empty($image_links[2])?'':$image_links[2], 'image_4' => empty($images[3])?'':$images[3], 'image_4_link' => empty($image_links[3])?'':$image_links[3], 'target_ids' => $target_ids, 'friend' => $friend, 'id' => $id, 'idtype' => $idtype ); $feedarr = sstripslashes($feedarr);//去掉转义 $feedarr['title_data'] = serialize(sstripslashes($title_data));//数组转化 $feedarr['body_data'] = serialize(sstripslashes($body_data));//数组转化 $feedarr['hash_template'] = md5($feedarr['title_template']."\t".$feedarr['body_template']);//喜好hash $feedarr['hash_data'] = md5($feedarr['title_template']."\t".$feedarr['title_data']."\t".$feedarr['body_template']."\t".$feedarr['body_data']);//合并hash $feedarr = saddslashes($feedarr);//增加转义 //去重 $query = $_SGLOBAL['db']->query("SELECT feedid FROM ".tname('feed')." WHERE uid='$feedarr[uid]' AND hash_data='$feedarr[hash_data]' LIMIT 0,1"); if($oldfeed = $_SGLOBAL['db']->fetch_array($query)) { updatetable('feed', $feedarr, array('feedid'=>$oldfeed['feedid'])); return 0; } //插入 if($returnid) { return inserttable('feed', $feedarr, $returnid); } else { inserttable('feed', $feedarr); return 1; } }
复制代码 为什么在发布时点匿名之后就变成这样了啊? |