|
@@ -74,8 +74,8 @@ if (!function_exists('GetOneArchive')) { |
|
|
/**
|
|
|
/**
|
|
|
* 获取模型的表信息
|
|
|
* 获取模型的表信息
|
|
|
*
|
|
|
*
|
|
|
* @param int $id 模型id
|
|
|
|
|
|
* @param string $formtype 表单类型
|
|
|
|
|
|
|
|
|
* @param int $id 模型id
|
|
|
|
|
|
* @param string $formtype 表单类型
|
|
|
* @return array
|
|
|
* @return array
|
|
|
*/
|
|
|
*/
|
|
|
if (!function_exists('GetChannelTable')) {
|
|
|
if (!function_exists('GetChannelTable')) {
|
|
@@ -96,7 +96,7 @@ if (!function_exists('GetChannelTable')) { |
|
|
/**
|
|
|
/**
|
|
|
* 获得某文档的所有tag
|
|
|
* 获得某文档的所有tag
|
|
|
*
|
|
|
*
|
|
|
* @param int $aid 文档id
|
|
|
|
|
|
|
|
|
* @param int $aid 文档id
|
|
|
* @return string
|
|
|
* @return string
|
|
|
*/
|
|
|
*/
|
|
|
if (!function_exists('GetTags')) {
|
|
|
if (!function_exists('GetTags')) {
|
|
@@ -140,7 +140,7 @@ if (!function_exists('GetIndexKey')) { |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
/**
|
|
|
* 更新微表key及Tag
|
|
|
|
|
|
|
|
|
* 更新微表key及tag
|
|
|
*
|
|
|
*
|
|
|
* @access public
|
|
|
* @access public
|
|
|
* @param int $id 文档id
|
|
|
* @param int $id 文档id
|
|
@@ -158,14 +158,14 @@ if (!function_exists('UpIndexKey')) { |
|
|
$addtime = time();
|
|
|
$addtime = time();
|
|
|
$query = "UPDATE `#@__arctiny` SET `arcrank`='$arcrank', `typeid`='$typeid', `typeid2`='$typeid2', `sortrank`='$sortrank' WHERE id = '$id' ";
|
|
|
$query = "UPDATE `#@__arctiny` SET `arcrank`='$arcrank', `typeid`='$typeid', `typeid2`='$typeid2', `sortrank`='$sortrank' WHERE id = '$id' ";
|
|
|
$dsql->ExecuteNoneQuery($query);
|
|
|
$dsql->ExecuteNoneQuery($query);
|
|
|
//处理修改后的Tag
|
|
|
|
|
|
|
|
|
//处理修改后的tag
|
|
|
if ($tags != '') {
|
|
|
if ($tags != '') {
|
|
|
$oldtag = GetTags($id);
|
|
|
$oldtag = GetTags($id);
|
|
|
$oldtags = explode(',', $oldtag);
|
|
|
$oldtags = explode(',', $oldtag);
|
|
|
$tagss = explode(',', $tags);
|
|
|
$tagss = explode(',', $tags);
|
|
|
foreach ($tagss as $tag) {
|
|
|
foreach ($tagss as $tag) {
|
|
|
$tag = trim($tag);
|
|
|
$tag = trim($tag);
|
|
|
if (isset($tag[12]) || $tag != stripslashes($tag)) {
|
|
|
|
|
|
|
|
|
if (isset($tag[255]) || $tag != stripslashes($tag)) {
|
|
|
continue;
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
|
if (!in_array($tag, $oldtags)) {
|
|
|
if (!in_array($tag, $oldtags)) {
|
|
@@ -184,11 +184,11 @@ if (!function_exists('UpIndexKey')) { |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
/**
|
|
|
* 插入Tags
|
|
|
|
|
|
|
|
|
* 插入tags
|
|
|
*
|
|
|
*
|
|
|
* @access public
|
|
|
* @access public
|
|
|
* @param string $tag 标签
|
|
|
* @param string $tag 标签
|
|
|
* @param int $aid 文档AID
|
|
|
|
|
|
|
|
|
* @param int $aid 文档aid
|
|
|
* @return void
|
|
|
* @return void
|
|
|
*/
|
|
|
*/
|
|
|
if (!function_exists('InsertTags')) {
|
|
|
if (!function_exists('InsertTags')) {
|
|
@@ -197,7 +197,7 @@ if (!function_exists('InsertTags')) { |
|
|
$tags = explode(',', $tag);
|
|
|
$tags = explode(',', $tag);
|
|
|
foreach ($tags as $tag) {
|
|
|
foreach ($tags as $tag) {
|
|
|
$tag = trim($tag);
|
|
|
$tag = trim($tag);
|
|
|
if (isset($tag[20]) || $tag != stripslashes($tag)) {
|
|
|
|
|
|
|
|
|
if (isset($tag[255]) || $tag != stripslashes($tag)) {
|
|
|
continue;
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
|
InsertOneTag($tag, $aid);
|
|
|
InsertOneTag($tag, $aid);
|
|
@@ -205,11 +205,11 @@ if (!function_exists('InsertTags')) { |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
/**
|
|
|
* 插入一个tag
|
|
|
|
|
|
|
|
|
* 插入tag
|
|
|
*
|
|
|
*
|
|
|
* @access public
|
|
|
* @access public
|
|
|
* @param string $tag 标签
|
|
|
* @param string $tag 标签
|
|
|
* @param int $aid 文档AID
|
|
|
|
|
|
|
|
|
* @param int $aid 文档aid
|
|
|
* @return void
|
|
|
* @return void
|
|
|
*/
|
|
|
*/
|
|
|
if (!function_exists('InsertOneTag')) {
|
|
|
if (!function_exists('InsertOneTag')) {
|
|
|