组保留的标签 余下为需要删除的标签
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;
}
?>
VirtualBox 安装ghost xp(雨林木风)-软件玩家 - 软件改变生活!
自从微软宣布停止更新XP以来,网上各种各样的xp序列号都不能用了,但是因为工作的需要又必须要装一个xp的虚拟机。因此只能忍痛装一个ghost版的xp(个人不太喜欢ghost版本,总觉得预装了很多乱七八糟的软件让我很不爽)。
自己鼓捣了几次发现ghost版的xp还没有想象中的那么好装,因此写一篇教程方便自己也方便别人,供大家参考一下:
↓↓↓↓
↓↓↓↓干货开始↓↓↓↓↓↓↓↓
1. 下载一个ghost版本的xp
比较好的有雨林木风、深度、番茄花园等等,在此我们选择雨林木风的镜像进行安装,下面分享两个下载链接:
雨林木风2014—32位:
http://pan.baidu/s/1kT86bYJ
深度—32位:
http://pan.baidu/s/1eQ9wjfG
2. 下载VirtualBox
VirtualBox作为开源的虚拟机环境,不像VMWare需要注册即可使用,而且VirtualBox还有Linux版本,因此选择VirtualBox。当然,大家也可以选择VMWare进行安装,步骤大同小异。同样放出下载链接:
VirtualBox4.3.10:
http://pan.baidu/s/1pJ5GcLd
VMWare:
http://pan.baidu/s/1pJr2R5x
3. 正式开始安装
1)新建虚拟机
打开
VirtualBox选择新建虚拟机,选择要安装的系统类型和名称:
2)配置系统
设置内存大小,这里设置512M或者1024M均可,自己调节(内存可以在安装完系统后随时在设置里进行更改)
创建虚拟硬盘,一般新建的虚拟机直接创建新的虚拟硬盘即可,如果是之前有创建好了的虚拟机,则可以选择使用已有虚拟硬盘文件直接添加
一下均选择默认即可:
3)启动,并安装
选择启动盘,就是我们下载的iso镜像文件
启动后进入雨林木风安装界面,我们进入winPE进行设置(注意,不管你要不要分盘,都要进行设置,因为要进行引导)
在启动后选择B从winPE启动,进入PE:
打开桌面上的硬盘快速分四区,直接选择yes
分区分好后打开桌面上“自动安装系统”
直接默认安装即可
等待其安装完成。安装完成后会自动重启,从硬盘进入系统。
等待安装驱动等配置:
重启数次之后就成功完成!!!
本文标签:
雨林VirtualboxGHOSTXP
发表评论