<?php /// Copyright (c) 2004-2016, Needlworks / Tatter Network Foundation /// All rights reserved. Licensed under the GPL. /// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT) $IV = array('POST' => array('targets' => array('list'), 'category' => array('int'))); require ROOT . '/library/preprocessor.php'; requireStrictRoute(); importlib("model.blog.entry"); if (changeCategoryOfEntries($blogid, $_POST['targets'], $_POST['category'])) { Respond::ResultPage(0); } else { Respond::ResultPage(1); }
exit; } if (!empty($_POST['modifyTag']) && !empty($_POST['newName'])) { $newTagId = renameTag($blogid, $_POST['modifyTag'], $_POST['newName']); $newTagList = getTagListTemplate(getSiteTags($blogid)); $newEntryList = '<a href="' . $context->getProperty('uri.blog') . '/owner/entry/?tagId=' . $newTagId . '">' . _f('"%1" 태그를 갖는 모든 글의 목록을 봅니다', $_POST['newName']) . '</a>'; $result = array('error' => 0, 'tagId' => $newTagId, 'entryList' => $newEntryList, 'tagList' => $newTagList); Respond::PrintResult($result); exit; } if (!empty($_POST['id']) && !empty($_POST['category'])) { $entries = array(); foreach (getEntriesByTagId($blogid, $_POST['id']) as $entry) { $entries[] = $entry['id']; } changeCategoryOfEntries($blogid, implode(',', $entries), $_POST['category']); } $tags = getSiteTags($blogid); if (isset($suri['value']) && !empty($suri['value'])) { $tag = $suri['value']; $list = getEntryListWithPagingByTag($blogid, $tag, $suri['page'], 20); } else { $list = null; } function getTagListTemplate($tags) { $view = ''; foreach ($tags as $t) { $view .= '<span id="tag' . $t['id'] . '" class="tag"><a href="#" class="tag" onclick="updateTagPanel(' . $t['id'] . ');return false;">' . $t['name'] . '</a></span> '; } return $view;