<div class="entrytype-post"> <input type="radio" id="type_post" class="radio" name="entrytype" value="0" onclick="checkCategory('type_post')"<?php echo $entry['category'] >= 0 ? ' checked="checked"' : ''; ?> /><label for="type_post"><?php echo _t('글'); ?> </label> <select id="category" name="category"<?php if ($isKeyword) { echo ' disabled="disabled"'; } ?> > <option value="0"><?php echo htmlspecialchars(getCategoryNameById($blogid, 0) ? getCategoryNameById($blogid, 0) : _t('전체')); ?> </option> <?php foreach (getCategories($blogid) as $category) { if ($category['id'] != 0) { ?> <option value="<?php echo $category['id']; ?> "<?php echo $category['id'] == $entry['category'] ? ' selected="selected"' : ''; ?> ><?php echo ($category['visibility'] > 1 ? '' : _t('(비공개)')) . htmlspecialchars($category['name']); ?>
/// All rights reserved. Licensed under the GPL. /// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT) define('NO_SESSION', true); define('__TEXTCUBE_LOGIN__', true); define('__TEXTCUBE_CUSTOM_HEADER__', true); require ROOT . '/library/preprocessor.php'; requireModel("blog.category"); requireStrictBlogURL(); $children = array(); $cache = pageCache::getInstance(); if (!empty($suri['id'])) { $categoryId = $suri['id']; if (in_array($categoryId, getCategoryVisibilityList($blogid, 'private'))) { return false; } $categotyTitle = getCategoryNameById($categoryId); } else { if (!empty($suri['value'])) { $categoryId = getCategoryIdByLabel(getBlogId(), $suri['value']); if (in_array($categoryId, getCategoryVisibilityList($blogid, 'private'))) { return false; } $categoryTitle = $suri['value']; } else { // If no category is mentioned, redirect it to total atom. header("Location: " . $context->getProperty('uri.host') . $context->getProperty('uri.blog') . "/atom"); exit; } } $cache->reset('categoryATOM-' . $categoryId); if (!$cache->load()) {
function PN_BlogStatisticsProcess($target) { global $blogid, $pluginURL, $defaultURL, $blog; if (doesHaveOwnership()) { include_once 'lib/open-flash-chart.php'; $grpStyle = $_GET['grpStyle']; $grpData = explode("|", $_GET['grpData']); $grpTotal = $_GET['grpTotal']; $grpYear = $_GET['grpYear']; $grpTypeName = $_GET['grpTypeName']; $grpLinkType = $_GET['grpLinkType']; $grpXLabelType = isset($_GET['grpXLabelType']) ? $_GET['grpXLabelType'] : 0; $grpLabel = explode("|", $_GET['grpLabel']); $grpSubTitle = array(); $grpLabelTemp = array(); if (!empty($_GET['grpData'])) { if ($grpTypeName == "category") { for ($i = 0; $i < count($grpLabel); $i++) { $grpSubTitle[] = rawurlencode($grpLabel[$i] == 0 ? _t('분류없음') : htmlspecialchars(UTF8::lessenAsEm(getCategoryNameById($blogid, $grpLabel[$i]), 15))); } } else { if ($grpTypeName == "hits" || $grpTypeName == "cmmax" || $grpTypeName == "tbmax" || $grpTypeName == "tagmax") { for ($i = 0; $i < count($grpLabel); $i++) { $grpSubTitle[] = rawurlencode(htmlspecialchars(UTF8::lessenAsEm(str_replace(",", "-", getEntryTitleById($blogid, $grpLabel[$i])), 25))); } } else { if ($grpTypeName == "commenter" || $grpTypeName == "tag") { for ($i = 0; $i < count($grpLabel); $i++) { $grpSubTitle[] = htmlspecialchars(UTF8::lessenAsEm($grpLabel[$i], 15)); $grpLabelTemp[] = htmlspecialchars(UTF8::lessenAsEm($grpLabel[$i], 6, '')); } $grpLabel = $grpLabelTemp; } else { if ($grpTypeName == "time") { for ($i = 0; $i < count($grpLabel); $i++) { $grpSubTitle[] = rawurlencode($grpLabel[$i] . "시"); } } else { if ($grpTypeName == "refer") { for ($i = 0; $i < count($grpLabel); $i++) { $tmpHost = explode('.', $grpLabel[$i]); $tmpHostCnt = count($tmpHost) - 1; $tmpDomain = (strlen($tmpHost[$tmpHostCnt]) < 3 ? $tmpHost[$tmpHostCnt - 2] . '.' : '') . $tmpHost[$tmpHostCnt - 1] . '.' . $tmpHost[$tmpHostCnt]; $cutDomain = explode('.', $tmpDomain); $grpSubTitle[] = htmlspecialchars($grpLabel[$i]); $grpLabelTemp[] = htmlspecialchars(UTF8::lessenAsEm($cutDomain[0], 6, '')); } $grpLabel = $grpLabelTemp; } else { if ($grpTypeName == "referkey") { for ($i = 0; $i < count($grpLabel); $i++) { $tmpLabel = explode('(', $grpLabel[$i]); $grpSubTitle[] = htmlspecialchars(UTF8::lessenAsEm($grpLabel[$i], 15)); $grpLabelTemp[] = htmlspecialchars(UTF8::lessenAsEm($tmpLabel[0], 6, '')); } $grpLabel = $grpLabelTemp; } } } } } } $g = new graph(); $g->bg_colour = '#FFFFFF'; if ($grpStyle == "pie") { $grpClickLink = ""; $grpPercent = array(); $grpLink = array(); for ($i = 0; $i < count($grpData); $i++) { $grpPercent[] = round($grpData[$i] / $grpTotal * 100, 0); } if ($grpLinkType == "archiveYear") { for ($i = 0; $i < count($grpLabel); $i++) { $permalink = $defaultURL . "/archive/" . substr($grpLabel[$i], 0, 4); $grpLink[] = "javascript:window.open('{$permalink}');void(0)"; } $grpClickLink = "<br>click on the pie."; } else { if ($grpLinkType == "archiveMonth" && $grpYear != "9999") { for ($i = 0; $i < count($grpLabel); $i++) { $cutMonth = str_replace("월", "", $grpLabel[$i]); $tmpMonth = strlen($cutMonth) == 1 ? "0" . $cutMonth : $cutMonth; $permalink = $defaultURL . "/archive/" . $grpYear . $tmpMonth; $grpLink[] = "javascript:window.open('{$permalink}');void(0)"; } $grpClickLink = "<br>click on the pie."; } else { if ($grpLinkType == "category") { for ($i = 0; $i < count($grpLabel); $i++) { $permalink = $defaultURL . "/category/" . getCategoryLabelById($blogid, $grpLabel[$i]); $grpLink[] = "javascript:window.open('{$permalink}');void(0)"; } $grpClickLink = "<br>click on the pie."; } else { if ($grpLinkType == "entry") { for ($i = 0; $i < count($grpLabel); $i++) { $permalink = $defaultURL . ($blog['useSlogan'] ? "/entry/" . getEntrySloganById($blogid, $grpLabel[$i]) : "/" . $grpLabel[$i]); $grpLink[] = "javascript:window.open('{$permalink}');void(0)"; } $grpClickLink = "<br>click on the pie."; } else { if ($grpLinkType == "tag") { for ($i = 0; $i < count($grpLabel); $i++) { $permalink = $defaultURL . "/tag/" . $grpLabel[$i]; $grpLink[] = "javascript:window.open('{$permalink}');void(0)"; } $grpClickLink = "<br>click on the pie."; } } } } } $g->pie(75, '#ffffff', '#000000', false, 1); $g->pie_values($grpData, $grpLabel, $grpLink, $grpSubTitle); $g->pie_slice_colours(array('#B9D2E6', '#E2B11C', '#A3CF22', '#EC7122', '#4FC0C0', '#D45E5E', '#A275A2', '#52A7D2', '#9F373B', '#B4ADA5', '#5FC97E', '#CFB85D', '#9DC64E', '#FFAB29', '#E23838', '#43CEA9', '#4CA9D9', '#BA4ECA', '#6C79DA', '#CCCCCC', '#AB5C06', '#C06868', '#5FC97E', 'CFB85D')); $g->set_tool_tip((count($grpSubTitle) ? '#x_title#<br>' : '#x_label#<br>') . '#val#(#percent#%25)' . $grpClickLink); } else { if ($grpStyle == "bar") { $g->title(' ', '{font-size:12px; color:#000000;margin-top:0px;padding:3px;}'); $g->set_data($grpData); $g->set_bar_titles($grpSubTitle); $g->bar_glass(70, '#68B1D9', '#62A0C1', '', 12); $g->bar_colours(array('#B9D2E6', '#E2B11C', '#A3CF22', '#EC7122', '#4FC0C0', '#D45E5E', '#A275A2', '#52A7D2', '#9F373B', '#B4ADA5', '#5FC97E', '#CFB85D', '#9DC64E', '#FFAB29', '#E23838', '#43CEA9', '#4CA9D9', '#BA4ECA', '#6C79DA', '#CCCCCC', '#AB5C06', '#C06868', '#5FC97E', 'CFB85D')); $g->x_axis_colour('#909090', '#D2D2FB'); $g->y_axis_colour('#909090', '#D2D2FB'); $g->set_x_labels($grpLabel); $g->set_x_label_style(10, '#000000', $grpXLabelType, -1); $g->set_y_label_style(9, '#888888'); $tmp_data_max = floor(Max($grpData) * 1.2); if ($tmp_y_max = $tmp_data_max % 10) { $tmp_data_max = $tmp_data_max + (10 - $tmp_y_max); } $g->set_y_max($tmp_data_max); $g->set_y_legend('', 11, '#736AFF'); $g->set_tool_tip((count($grpSubTitle) ? '#x_title#<br>' : '#x_label#<br>') . '#val#'); } else { if ($grpStyle == "line") { $g->title('', '{font-size:1px; color:#000000;}'); $g->set_data($grpData); $g->line_dot(2, 4, '#6FBBC6', _t('최근 7일간 방문자 수'), 11); // <-- 3px thick + dots $g->set_x_labels($grpLabel); $g->set_x_label_style(8, '#333333', $grpXLabelType, -1); $g->x_axis_colour('#909090', '#e7e7e7'); $g->y_axis_colour('#909090', '#e7e7e7'); $tmp_data_max = floor(Max($grpData) * 1.2); if ($tmp_y_max = $tmp_data_max % 10) { $tmp_data_max = $tmp_data_max + (10 - $tmp_y_max); } $g->set_y_max($tmp_data_max); $g->set_y_legend('', 1, '#736AFF'); $g->y_label_steps(4); $g->set_y_label_style(8, '#333333', $grpXLabelType, -1); $g->set_tool_tip((count($grpSubTitle) ? '#x_title#<br>' : '#x_label#<br>') . '#val#'); } } } echo $g->render(); flush(); } } }
function getCategoriesViewInSkinSetting($totalPosts, $categories, $selected) { importlib('model.blog.category'); importlib('blogskin'); $tree = array('id' => 0, 'label' => getCategoryNameById(getBlogId(), 0), 'value' => $totalPosts, 'link' => "", 'children' => array()); foreach ($categories as $category1) { $children = array(); foreach ($category1['children'] as $category2) { array_push($children, array('id' => $category2['id'], 'label' => $category2['name'], 'value' => doesHaveOwnership() ? $category2['entriesinlogin'] : $category2['entries'], 'link' => "", 'children' => array())); } if ($category1['id'] != 0) { array_push($tree['children'], array('id' => $category1['id'], 'label' => $category1['name'], 'value' => doesHaveOwnership() ? $category1['entriesinlogin'] : $category1['entries'], 'link' => "", 'children' => $children)); } } ob_start(); printTreeView($tree, $selected, true); $view = ob_get_contents(); ob_end_clean(); return $view; }
} } else { if (!empty($_POST['modifyCategoryName']) || !empty($_POST['modifyCategoryBodyId'])) { $history = modifyCategory($blogid, $_POST['id'], trim($_POST['modifyCategoryName']), trim($_POST['modifyCategoryBodyId'])) ? 'document.getElementById("modifyCategoryName").select();' : ''; $tempParentId = POD::queryCell("SELECT `parent` FROM `{$database['prefix']}Categories` WHERE `id` = {$_POST['id']} AND `blogid` = " . getBlogId()); if (preg_match('/^[0-9]+$/', $tempParentId, $temp)) { $depth = 2; } else { $depth = 1; } } else { $history = ''; } } $categories = getCategories($blogid); $name = getCategoryNameById($blogid, $selected) ? getCategoryNameById($blogid, $selected) : _t('전체'); $bodyid = getCategoryBodyIdById($blogid, $selected); if (empty($_POST['search']) || $searchColumn === true) { $searchParam = true; } else { $searchParam[0] = $_POST['searchColumn']; $searchParam[1] = $_POST['search']; } require ROOT . '/interface/common/owner/header.php'; ?> <script type="text/javascript"> //<![CDATA[ function removeCategory() { if(confirm('<?php echo _t('삭제 하시겠습니까?'); ?>
if (!($listWithPaging = getEntryListWithPagingByCategory($blogid, $category, $suri['page'], $blog['entriesOnList']))) { $listWithPaging = array(array(), array('total' => 0)); } $list = array('title' => empty($suri['value']) ? getCategoryLabelById($blogid, 0) : $suri['value'], 'items' => $listWithPaging[0], 'count' => $listWithPaging[1]['total']); $paging = $listWithPaging[1]; ?> <ul class="posts" id="category_<?php echo $suri['page']; ?> " title="<?php echo $category == 0 ? _text('모든 카테고리') : ucwords(getCategoryNameById($blogid, $category)); ?> " selected="false"> <?php $itemsView = '<li class="group">' . CRLF; $itemsView .= ' <span class="left">' . ($category == 0 ? _text('모든 카테고리') : ucwords(getCategoryNameById($blogid, $category))) . ' (' . $list['count'] . ')</span>' . CRLF; $itemsView .= ' <span class="right">Page <span class="now_page">' . $paging['page'] . '</span> / ' . $paging['pages'] . '</span>' . CRLF; $itemsView .= '</li>' . CRLF; foreach ($list['items'] as $item) { $author = User::getName($item['userid']); if ($imageName = printIphoneAttachmentExtract(printIphoneEntryContent($blogid, $item['userid'], $item['id']))) { $imageSrc = printIphoneImageResizer($blogid, $imageName, 28); } else { $imageSrc = $service['path'] . '/resources/style/iphone/image/noPostThumb.png'; } $itemsView .= '<li class="post_item">' . CRLF; $itemsView .= ' <span class="image"><img src="' . $imageSrc . '" width="28" height="28" /></span>' . CRLF; $itemsView .= ' <a href="' . $blogURL . '/entry/' . $item['id'] . '" class="link">' . CRLF; $itemsView .= ' <div class="post">' . CRLF; $itemsView .= ' <span class="title">' . fireEvent('ViewListTitle', htmlspecialchars($item['title'])) . '</span>' . CRLF; $itemsView .= ' <span class="description">' . Timestamp::format5($item['published']) . ', ' . 'Comments(' . ($item['comments'] > 0 ? $item['comments'] : 0) . ')' . '</span>' . CRLF;
<?php /// Copyright (c) 2004-2012, Needlworks / Tatter Network Foundation /// All rights reserved. Licensed under the GPL. /// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT) define('__TEXTCUBE_IPHONE__', true); require ROOT . '/library/preprocessor.php'; requireView('iphoneView'); printMobileHTMLHeader(); printMobileHTMLMenu('', 'list'); $category = $suri['id']; if (isset($category)) { $blog['entriesOnList'] = 8; if (!($listWithPaging = getEntriesWithPagingByCategory($blogid, $category, $suri['page'], $blog['entriesOnList'], 1))) { $listWithPaging = array(array(), array('total' => 0)); } $list = array('title' => empty($suri['value']) ? getCategoryLabelById($blogid, 0) : $suri['value'], 'items' => $listWithPaging[0], 'count' => $listWithPaging[1]['total']); $paging = $listWithPaging[1]; print printMobileEntryListView($list['items'], 'category_' . $suri['page'], $category == 0 ? _text('모든 카테고리') : ucwords(getCategoryNameById($blogid, $category)), $paging, $list['count']); print printMobileListNavigation($paging, 'category/' . $category); }
function getCategoryLinkById($blogid, $id) { if ($id === null || $id === 0) { return ''; } $result = getCategoryNameById($blogid, $id); if ($children = getParentCategoryId($blogid, $id)) { $result = rawurlencode(htmlspecialchars(escapeURL(getCategoryNameById($blogid, $children)))) . '/' . rawurlencode(htmlspecialchars(escapeURL($result))); } else { $result = rawurlencode(htmlspecialchars(escapeURL($result))); } return $result; }
if ($month == 0) { // whole year $timeStart = mktime(0, 0, 0, 1, 1, $year); $timeEnd = mktime(23, 59, 59, 12, 31, $year); } else { // whole month $timeStart = mktime(0, 0, 0, $month, 1, $year); $timeEnd = mktime(0, 0, 0, $month + 1, 1, $year); } $statisticByCat = getStatisticByTimePeriod($type, $timeStart, $timeEnd); $pageCount = getPageCountByTimePeriod($timeStart, $timeEnd); $accountItems = getAccountItemByTimePeriod($pageNum, $itemCount, $type, $categoryId, $timeStart, $timeEnd); } $idx = 0; $staticCategories; while ($row = mysql_fetch_array($statisticByCat)) { $row['categoryName'] = mysql_result(getCategoryNameById($row['category_id']), 0); $staticCategories[$idx++] = $row; } $num_rows = mysql_num_rows($accountItems); $parentPage = 'statistic.php'; $smarty = new Smarty_AccountBook(); $smarty->assign('year', $year); $smarty->assign('month', $month); $smarty->assign('type', $type); $smarty->assign('staticCategories', $staticCategories); $smarty->assign('numRows', $num_rows); $smarty->assign('titleType', $titleType); $smarty->assign('pageCount', $pageCount); include "account_list.php"; $smarty->display('statistic.tpl');
<?php include "da_access.php"; require_once "setups/smarty_setup.php"; //include("checkLogin.php"); $result = getAccountItemById($_GET['id']); $accountItem = mysql_fetch_object($result); $categoryName = mysql_result(getCategoryNameById($accountItem->category_id), 0); $smarty = new Smarty_AccountBook(); include 'category_div.php'; $smarty->assign('accountItem', $accountItem); $smarty->assign('categoryName', $categoryName); $smarty->assign('itemId', $_GET['id']); $smarty->display('account_item_update.tpl');