function pc_edit_link($link, $favlinks, $uid) { global $pc; $links = ""; foreach ($favlinks as $favlink) { if ($links == "") { $links .= base64_encode($favlink["LINK"]) . "#" . base64_encode($favlink["URL"]) . "#" . (int) $favlink["IMAGE"]; } else { $links .= "|" . base64_encode($favlink["LINK"]) . "#" . base64_encode($favlink["URL"]) . "#" . (int) $favlink["IMAGE"]; } } $query = "UPDATE users SET `createtime` = `createtime` , `modifytime` = '" . date("YmdHis") . "' , `links` = '" . addslashes($links) . "' WHERE `uid` = '" . $uid . "' "; mysql_query($query, $link); if ($pc["TYPE"] == 1) { pc_group_logs($link, $pc, "EDIT LINKS"); } }
function del_friend($pc) { $id = $_GET["id"]; pc_del_friend($id, $pc["USER"]); if (pc_is_groupwork($pc)) { pc_group_logs($link, $pc, "DEL FRIEND: " . $id); } }
exit; } if (pc_file_num($link, $pc["UID"], $pid) + 1 > $pc["NLIM"]) { pc_html_init("gb2312", stripslashes($pc["NAME"])); html_error_quit("目标文件夹中的文件数已达上限 " . $pc["NLIM"] . " 个!"); exit; } if (intval($_COOKIE["BLOGFAVNID"])) { if ($_COOKIE["BLOGFAVACTION"] == "favcut") { $query = "UPDATE nodes SET `pid` = '" . $pid . "' WHERE `nid` = '" . intval($_COOKIE["BLOGFAVNID"]) . "';"; } elseif ($_COOKIE["BLOGFAVACTION"] == "favcopy") { $query = "SELECT * FROM nodes WHERE `nid` = '" . intval($_COOKIE["BLOGFAVNID"]) . "' LIMIT 0 , 1 ;"; $result = mysql_query($query, $link); $rows = mysql_fetch_array($result); mysql_free_result($result); $query = "INSERT INTO `nodes` ( `nid` , `pid` , `type` , `source` , `hostname` , `changed` , `created` , `uid` , `comment` , `commentcount` , `subject` , `body` , `access` , `visitcount` , `tid` , `emote` ,`htmltag`) " . "VALUES ('', '" . $pid . "', '0', '" . addslashes($rows["source"]) . "', '" . addslashes($rows["hostname"]) . "', NOW( ) , '" . addslashes($rows["created"]) . "', '" . $pc["UID"] . "', '" . intval($rows["comment"]) . "', '" . intval($rows["commentcount"]) . "', '" . addslashes($rows["subject"]) . "', '" . addslashes($rows["body"]) . "', '3', '" . intval($rows["visitcount"]) . "', '" . intval($rows["tid"]) . "', '" . intval($rows["emote"]) . "','" . intval($rows["htmltag"]) . "');"; } mysql_query($query, $link); } setcookie("BLOGFAVACTION"); setcookie("BLOGFAVNID"); pc_html_init("gb2312", stripslashes($pc["NAME"])); pc_update_record($link, $pc["UID"]); $log_action = "CUT/COPY FAV"; pc_return("pcdoc.php?userid=" . $pc["USER"] . "&tag=3&pid=" . $pid); } if (pc_is_groupwork($pc)) { pc_group_logs($link, $pc, $log_action, $log_content); } html_normal_quit(); }
function pc_convertto_group($link, $pc) { if (!$pc || !is_array($pc)) { return -1; } if (pc_is_groupwork($pc)) { return -2; } $query = "UPDATE users SET createtime = createtime , pctype = 1 WHERE uid = " . $pc["UID"] . " LIMIT 1;"; if (!mysql_query($query, $link)) { return -4; } $pc["TYPE"] = 1; if (!pc_group_logs($link, $pc, "CONVERT TO GROUPWORK")) { return -5; } return 0; }