pwSendMsg($msg); } $wordsfb = L::loadClass('FilterUtil'); if (($banword = $wordsfb->comprise($atc_content)) !== false) { Showmsg('content_wordsfb'); } $db->update("UPDATE {$pw_posts} SET leaveword=" . pwEscape($atc_content) . " {$sqladd} WHERE pid=" . pwEscape($pid) . ' AND tid=' . pwEscape($tid)); echo "success\t" . str_replace(array("\n", "\t"), array('<br />', ''), stripslashes($content)); ajax_footer(); } } elseif ($action == 'favor') { PostCheck(); $rs = $db->get_one('SELECT tids,type FROM pw_favors WHERE uid=' . pwEscape($winduid)); if ($rs) { $count = 0; $tiddb = getfavor($rs['tids']); foreach ($tiddb as $key => $t) { if (is_array($t)) { if (CkInArray($tid, $t)) { Showmsg('job_favor_error'); } $count += count($t); } else { unset($tiddb[$key]); } } $count > $_G['maxfavor'] && Showmsg('job_favor_full'); InitGP(array('type'), 2); $typeid = array('0' => 'default'); if ($rs['type']) { $typeid = array_merge($typeid, explode(',', $rs['type']));
$where .= 's.uid=' . pwEscape($u) . ' AND s.ifhidden=0'; $faceimg = $friend['face']; $username = $friend['username']; } else { Showmsg('mode_o_not_friend'); } //$thisbase .= "u=$u&"; } else { $where .= 's.uid=' . pwEscape($winduid) . ' AND s.ifhidden=0'; $username = $windid; } } $sum = $db->get_value("SELECT count(*) as sum FROM pw_share s WHERE {$where}"); if ($a == 'my') { $favor = $db->get_one("SELECT tids,type FROM pw_favors WHERE uid=" . pwEscape($u)); list(, $favor_num) = getfavor($favor['tids']); $sum += (int) $favor_num; } if ($type && in_array($type, array('web', 'user', 'photo', 'album', 'group', 'video', 'music', 'flash', 'diary', 'topic'))) { $where .= $where == '' ? 's.type=' . pwEscape($type) : ' AND s.type=' . pwEscape($type); } $shares = array(); $count = $db->get_value("SELECT count(*) as count FROM pw_share s WHERE {$where}"); if ($count) { $page = (int) GetGP('page'); $db_perpage = 10; list($pages, $limit) = pwLimitPages($count, $page, "{$basename}a={$a}&type={$type}&"); if (!$db_dopen) { $where .= " AND s.type!='diary'"; } if (!$db_phopen) {