示例#1
0
文件: index.php 项目: ragi79/Textcube
<?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)
require ROOT . '/library/preprocessor.php';
require ROOT . '/interface/common/owner/header.php';
if (isset($_POST['search'])) {
    $search = $_POST['search'];
} else {
    $search = null;
}
// get the list type.
$listType = Setting::getBlogSetting('skinViewType', 'iconview', true);
$currentAdminSkin = Setting::getBlogSetting("adminSkin", "canon", true);
$skins = array();
function writeValue($value, $label, $className)
{
    ?>
										<dl class="<?php 
    echo $className;
    ?>
-line">
											<dt class="name"><?php 
    echo $label;
    ?>
</dt>
											<dd class="explain"><?php 
    echo nl2br(addLinkSense($value, ' onclick="window.open(this.href); return false;"'));
    ?>
</dd>
 function getBlogSetting($name, $default = null)
 {
     return Setting::getBlogSetting($name, $default);
 }
示例#3
0
function PN_Referer_Default()
{
    global $pluginMenuURL, $pluginSelfParam;
    if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['page'])) {
        $_GET['page'] = $_POST['page'];
    }
    $page = Setting::getBlogSetting('RowsPerPageReferer', 20);
    if (empty($_POST['perPage'])) {
        $perPage = $page;
    } else {
        if ($page != $_POST['perPage']) {
            Setting::setBlogSetting('RowsPerPageReferer', $_POST['perPage']);
            $perPage = $_POST['perPage'];
        } else {
            $perPage = $_POST['perPage'];
        }
    }
    ?>
						<div id="part-statistics-rank" class="part">
							<h2 class="caption"><span class="main-text"><?php 
    echo _t("리퍼러 순위");
    ?>
</span></h2>
							
							<table class="data-inbox" cellspacing="0" cellpadding="0">
								<thead>
									<tr>
										<th class="number"><span class="text"><?php 
    echo _t("순위");
    ?>
</span></th>
										<th class="site"><span class="text"><?php 
    echo _t("리퍼러");
    ?>
</span></th>
									</tr>
								</thead>
								<tbody>
<?php 
    $temp = Statistics::getRefererStatistics(getBlogId());
    for ($i = 0; $i < count($temp); $i++) {
        $record = $temp[$i];
        $className = $i % 2 == 1 ? 'even-line' : 'odd-line';
        $className .= $i == sizeof($temp) - 1 ? ' last-line' : '';
        ?>
									<tr class="<?php 
        echo $className;
        ?>
 inactive-class" onmouseover="rolloverClass(this, 'over')" onmouseout="rolloverClass(this, 'out')">
										<td class="rank"><?php 
        echo $i + 1;
        ?>
.</td>
										<td class="site"><a href="http://<?php 
        echo Utils_Misc::escapeJSInAttribute($record['host']);
        ?>
" onclick="window.open(this.href); return false;"><?php 
        echo htmlspecialchars($record['host']);
        ?>
</a> <span class="count">(<?php 
        echo $record['count'];
        ?>
)</span></td>
									</tr>
<?php 
    }
    ?>
								</tbody>
							</table>
						</div>
						
						<hr class="hidden" />
						
						<form id="part-statistics-log" class="part" method="post" action="<?php 
    echo $pluginMenuURL;
    ?>
">
							<h2 class="caption"><span class="main-text"><?php 
    echo _t("리퍼러 로그");
    ?>
</span></h2>
							
							<table class="data-inbox" cellspacing="0" cellpadding="0">
								<thead>
									<tr>
										<th class="number"><span class="text">날짜</span></th>
										<th class="site"><span class="text">주소</span></th>
									</tr>
								</thead>
								<tbody>
<?php 
    $more = false;
    list($referers, $paging) = Statistics::getRefererLogsWithPage($_GET['page'], $perPage);
    for ($i = 0; $i < count($referers); $i++) {
        $record = $referers[$i];
        $className = $i % 2 == 1 ? 'even-line' : 'odd-line';
        $className .= $i == sizeof($referers) - 1 ? ' last-line' : '';
        ?>
									<tr class="<?php 
        echo $className;
        ?>
 inactive-class" onmouseover="rolloverClass(this, 'over')" onmouseout="rolloverClass(this, 'out')">
										<td class="date"><?php 
        echo Timestamp::formatDate($record['referred']);
        ?>
</td>
										<td class="address"><a href="<?php 
        echo Utils_Misc::escapeJSInAttribute($record['url']);
        ?>
" onclick="window.open(this.href); return false;" title="<?php 
        echo htmlspecialchars($record['url']);
        ?>
"><?php 
        echo fireEvent('ViewRefererURL', htmlspecialchars(Utils_Unicode::lessenAsEm($record['url'], 70)), $record);
        ?>
</a></td>
									</tr>
<?php 
    }
    ?>
								</tbody>
							</table>
							
							<div class="data-subbox">
								<div id="page-section" class="section">
									<div id="page-navigation">
										<span id="page-list">
<?php 
    $paging['prefix'] = $pluginSelfParam . '&page=';
    $pagingTemplate = '[##_paging_rep_##]';
    $pagingItemTemplate = '<a [##_paging_rep_link_##]>[[##_paging_rep_link_num_##]]</a>';
    echo str_repeat("\t", 8) . Paging::getPagingView($paging, $pagingTemplate, $pagingItemTemplate) . CRLF;
    ?>
										</span>
									</div>
									<div class="page-count">
										<?php 
    echo Utils_Misc::getArrayValue(explode('%1', '한 페이지에 목록 %1건 표시'), 0);
    ?>
										<select name="perPage" onchange="document.getElementById('part-statistics-log').submit()">					
<?php 
    for ($i = 10; $i <= 30; $i += 5) {
        if ($i == $perPage) {
            ?>
											<option value="<?php 
            echo $i;
            ?>
" selected="selected"><?php 
            echo $i;
            ?>
</option>
<?php 
        } else {
            ?>
											<option value="<?php 
            echo $i;
            ?>
"><?php 
            echo $i;
            ?>
</option>
<?php 
        }
    }
    ?>
										</select>
										<?php 
    echo Utils_Misc::getArrayValue(explode('%1', '한 페이지에 목록 %1건 표시'), 1);
    ?>
									</div>
								</div>
							</div>
						</form>
						
						<div class="clear"></div>
<?php 
}
示例#4
0
文件: line.php 项目: ragi79/Textcube
        $key = null;
    }
    $content = $_POST['content'];
    $category = $_POST['category'];
    $mode = $_POST['mode'];
} else {
    $key = $_GET['key'];
    $content = $_GET['content'];
    $category = $_GET['category'];
    $mode = $_GET['mode'];
}
$lineobj = Model_Line::getInstance();
$lineobj->reset();
// If line comes.
if (!empty($content)) {
    $password = Setting::getBlogSetting('LinePassword', null, true);
    if ($password === $key || doesHaveOwnership()) {
        $lineobj->content = $content;
        $lineobj->category = $category;
        $result = $lineobj->add();
        fireEvent('AddLine', $result, $lineobj);
        $cache = pageCache::getInstance();
        $cache->name = 'linesATOM';
        $cache->purge();
        $cache->reset();
        $cache->name = 'linesRSS';
        $cache->purge();
        if ($mode == 'url') {
            $lineobj->showResult($result);
        } else {
            Respond::ResultPage(0);
示例#5
0
文件: index.php 项目: ragi79/Textcube
function PN_Subscription_Sidebar($target)
{
    requireComponent("Textcube.Function.Setting");
    $count = Setting::getBlogSetting('SubscriberCount', null);
    $text = '<div class="SubscriptionPanel" style="text-align:center">';
    if ($count === null) {
        $text .= _t('구독 정보 갱신이 필요합니다');
    } else {
        $text .= _f('%1 명이 RSS를 구독하고 있습니다.', $count);
    }
    $text .= '</div>';
    return $text;
}
示例#6
0
<?php

/// Copyright (c) 2004-2015, 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_HEADER_XML__', true);
require ROOT . '/library/preprocessor.php';
if ($_POST['visibility'] == 'private') {
    $visibility = 'private';
} else {
    $visibility = 'public';
}
$password = Setting::getBlogSetting('LinePassword', null, true);
if (is_null($password)) {
    $password = md5(generatePassword());
    Setting::setBlogSetting('LinePassword', $password, true);
}
$provider = new Model_OpenSearchProvider();
$provider->setDescriptor('ShortName', Setting::getBlogSetting('title', 'TITLE', true));
$provider->setDescriptor('Description', Setting::getBlogSetting('description', 'DESCRIPTION', true));
$provider->setDescriptor('Url', null);
$provider->addAttribute('/OpenSearchDescription', 'xmlns', 'http://a9.com/-/spec/opensearch/1.1/');
$provider->addAttribute('/OpenSearchDescription/Url', 'type', 'text/html');
$provider->addAttribute('/OpenSearchDescription/Url', 'template', $context->getProperty('uri.default') . '/line?key=' . $password . '&amp;mode=' . $visibility . '&amp;content={searchTerms}');
$provider->setDescriptor('Language', Setting::getBlogSetting('language', 'ko-kr', true));
$provider->setDescriptor('OutputEncoding', 'utf-8');
$provider->setDescriptor('InputEncoding', 'utf-8');
$provider->generate();
echo $provider->_xmlcontent;
示例#7
0
文件: index.php 项目: ragi79/Textcube
<?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)
$IV = array('POST' => array('url' => array('url', 'default' => ''), 'title' => array('string', 'default' => ''), 'excerpt' => array('string', 'default' => ''), 'blog_name' => array('string', 'default' => '')), 'SERVER' => array('CONTENT_TYPE' => array('string', 'default' => '')));
require ROOT . '/library/preprocessor.php';
if (!Setting::getBlogSetting('acceptTrackbacks', 1)) {
    Respond::PrintResult(array('error' => 1, 'message' => 'The entry does not accept trackback'));
    exit;
}
$url = $_POST['url'];
$title = !empty($_POST['title']) ? $_POST['title'] : '';
$excerpt = !empty($_POST['excerpt']) ? $_POST['excerpt'] : '';
$blog_name = !empty($_POST['blog_name']) ? $_POST['blog_name'] : '';
if (!empty($_SERVER["CONTENT_TYPE"]) && strpos($_SERVER["CONTENT_TYPE"], 'charset') > 0) {
    $charsetPos = strpos($_SERVER["CONTENT_TYPE"], 'charset');
    $charsetArray = explode('=', substr($_SERVER["CONTENT_TYPE"], $charsetPos));
    $charset = $charsetArray[1];
    $ary[] = trim($charset);
}
/*if(!isset($suri['id'])) $suri['id'] = getEntryIdBySlogan($blogid, $suri['value']);
if(empty($suri['id'])) {
	Respond::PrintResult(array('error' => 1, 'message' => 'URL is not exist or invalid'));
	exit;
}*/
$result = receiveTrackback($blogid, $suri['id'], $title, $url, $excerpt, $blog_name);
if ($result == 0) {
    if ($row = POD::queryRow("SELECT * \n\t\tFROM {$database['prefix']}Entries\n\t\tWHERE blogid = {$blogid} \n\t\t\tAND id = {$suri['id']} \n\t\t\tAND draft = 0 \n\t\t\tAND visibility = 3 \n\t\t\tAND acceptcomment = 1")) {
        sendTrackbackPing($suri['id'], $context->getProperty('uri.default') . "/" . ($context->getProperty('blog.useSloganOnPost') ? "entry/{$row['slogan']}" : $suri['id']), $url, $blog_name, $title);
    }