组保留的标签 余下为需要删除的标签 unset($oldtag[$key]); } } } if (!empty($oldtag)) { $tagids = array(); foreach ($oldtag as $tagid => $tagname) { $tagids[] = $tagid; } well_oldtag_delete($tagids, $tid); } $r = well_tag_process($tid, $fid, $create_tag, $tagarr); return $r; } // 删除标签和绑定的主题 function well_oldtag_delete($tagids, $tid) { $pagesize = count($tagids); $arrlist = well_tag_find_by_tagids($tagids, 1, $pagesize); $delete_tagids = array(); // 删除 $tagids = array(); $n = 0; foreach ($arrlist as $val) { ++$n; if (1 == $val['count']) { // 只有一个主题 $delete_tagids[] = $val['tagid']; } else { $tagids[] = $val['tagid']; } } !empty($delete_tagids) and well_tag_delete($delete_tagids); $arlist = well_tag_thread_find_by_tid($tid, 1, $n); if ($arlist) { $ids = array(); foreach ($arlist as $val) $ids[] = $val['id']; well_tag_thread_delete($ids); } !empty($tagids) and well_tag_update($tagids, array('count-' => 1)); } // 标签数据处理 $arr=新提交的数组 $tagarr=保留的旧标签 function well_tag_process($tid, $fid, $new_tags = array(), $tagarr = array()) { if (empty($tid)) return ''; // 新标签处理入库 if ($new_tags) { $threadarr = array(); $tagids = array(); $i = 0; $size = 5; $n = count($tagarr); $n = $n > $size ? $size : $size - $n; foreach ($new_tags as $name) { ++$i; $name = trim($name); $name = stripslashes($name); $name = strip_tags($name); $name = str_replace(array(' ', '#', "@", "$", "%", "^", '&', '·', '<', '>', ';', '`', '~', '!', '¥', '……', ';', '?', '?', '-', '—', '_', '=', '+', '.', '{', '}', '|', ':', ':', '、', '/', '。', '[', ']', '【', '】', '‘', ' ', ' ', ' ', ' ', ' '), '', $name); $name = htmlspecialchars($name, ENT_QUOTES); if ($name && $i <= $n) { // 查询标签 $read = well_tag_read_name($name); if ($read) { // 存在 count+1 $tagids[] = $read['tagid']; } else { // 入库 $arr = array('name' => $name, 'count' => 1); $tagid = well_tag_create($arr); FALSE === $tagid and message(-1, lang('create_failed')); $read = array('tagid' => $tagid, 'name' => $name); } $tag_thread = array('tagid' => $read['tagid'], 'tid' => $tid); $threadarr[] = $tag_thread; $tagarr[$read['tagid']] = $read['name']; } } !empty($threadarr) and tag_thread_big_insert($threadarr); !empty($tagids) and well_tag_update($tagids, array('count+' => 1)); } $json = empty($tagarr) ? '' : xn_json_encode($tagarr); return $json; } ?>XP

微软 Windows XP 源代码遭泄露!

对于微软已经不提供安全支持的 Windows XP、Windows 7&#xff0c;你还在用么&#xff1f; 近日&#xff0c;已退役多年的 Windows XP 系统&#xff0c;再次重回大众视野&

2024-10-15960

虚拟机安装windows xp系统时,找不到网络连接

今天安装了在虚拟机中安装了windows xp系统&#xff0c;然后打算配置一下网络&#xff0c;发现网络连接不见了。第一反应可能是没有网络设备器&#xff0c;在虚拟机中设置查看发现有网络设备器 然后在设

2024-10-15500

VM虚拟机安装Windows XP Professional

文章目录 安装XP下载img镜像安装激活安装VM-Tools 参考 安装XP 下载img镜像 在MSDN安装原版系统镜像-img文件&#xff0c;地址https:msdn.itellyou 安装激活 新建虚拟机&#

2024-10-15850

windows XP 神key

微软内部泄露的XP的CD-KEY和无限次激活码&#xff01;亲测&#xff01;&#xff01;&#xff01; Windows XP专业版最新注册码HTXH6-2JJC4-CDB6C-X38B4-C3GF

2024-10-15660

xp系统能用python吗_windows xp 下使用 python

一直在心理上很回避在windows下面使用python,甚至曾经宁可扔给别人一个 VM 虚拟机,仅仅为了跑一个简单的linux下的小代码。 但是终究有些时候没有办法,这里记录下 python 在windows下的部署过程。 准备下载目录 建

2024-10-15780

[补充] 如何让 Windows 7 支援 XP 模式

如果您读过我在七月二十九日发布的如何让 Windows 7 支援 XP 模式&#xff0c;那么这篇会针对 Windows Virtual PC 及 Windows XP Mode 再多做一些说明。 Windows Virtual

2024-10-11630