예제 #1
0
파일: index.php 프로젝트: ragi79/Textcube
requireModel("blog.tag");
requireModel("blog.locative");
requireModel("blog.attachment");
$context = Model_Context::getInstance();
$isKeyword = false;
define('__TEXTCUBE_EDIT__', true);
if (defined('__TEXTCUBE_POST__')) {
    $suri['id'] = 0;
}
if (isset($_GET['draft'])) {
    $entry = getEntry(getBlogId(), $suri['id'], true);
} else {
    $entry = getEntry(getBlogId(), $suri['id'], false);
}
if (is_null($entry)) {
    Respond::ErrorPage(_t('포스트 정보가 존재하지 않습니다.'));
    $isKeyword = $entry['category'] == -1;
}
if (defined('__TEXTCUBE_POST__') && isset($_GET['category'])) {
    $entry['category'] = $_GET['category'];
}
if (isset($_POST['slogan'])) {
    $_GET['slogan'] = $_POST['slogan'];
}
if (defined('__TEXTCUBE_POST__') && isset($_GET['slogan'])) {
    $entry['slogan'] = $_GET['slogan'];
    $entry['title'] = $_GET['slogan'];
}
// Check whether or not user has permission to edit.
if (Acl::check('group.editors') === false && !empty($suri['id'])) {
    if (getUserIdOfEntry(getBlogId(), $suri['id']) != getUserId()) {
예제 #2
0
 function __construct($filename)
 {
     $context = Model_Context::getInstance();
     if (!($sval = file_get_contents($filename))) {
         Respond::ErrorPage("KeywordSkin");
     }
     $origPath = $context->getProperty('uri.service') . substr($filename, strlen(ROOT));
     $origPath = substr($origPath, 0, 0 - strlen(Path::getBaseName($origPath)));
     $sval = str_replace('./', $origPath, $sval);
     replaceSkinTag($sval, 'html');
     replaceSkinTag($sval, 'head');
     replaceSkinTag($sval, 'body');
     list($sval, $this->keylogItem) = $this->cutSkinTag($sval, 'blog_rep');
     list($sval, $this->keylog) = $this->cutSkinTag($sval, 'blog');
     $this->outter = $sval;
 }
예제 #3
0
파일: keylog.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)
define('__TEXTCUBE_KEYLOG__', true);
require ROOT . '/library/preprocessor.php';
if (strlen($suri['value'])) {
    if (!($keylog = getKeylogByTitle($blogid, $suri['value']))) {
        Respond::ErrorPage();
        exit;
    }
    $entries = array();
    $entries = getEntriesByKeyword($blogid, $keylog['title']);
    $skinSetting['keylogSkin'] = fireEvent('setKeylogSkin');
    if (!is_null($skinSetting['keylogSkin'])) {
        require ROOT . '/interface/common/blog/keylog.php';
    } else {
        Respond::ErrorPage(_t('No handling plugin'));
    }
} else {
    $keywords = getKeywordNames($blogid, true);
    $skinSetting['keylogSkin'] = fireEvent('setKeylogSkin');
    require ROOT . '/interface/common/blog/begin.php';
    require ROOT . '/interface/common/blog/keywords.php';
    require ROOT . '/interface/common/blog/end.php';
}
예제 #4
0
$pool = DBModel::getInstance();
if ((doesHaveMembership() || !empty($_POST['name'])) && !empty($_POST['comment']) && !empty($_POST['mode']) && $_POST['mode'] == 'commit') {
    if (!empty($_POST['name'])) {
        setcookie('guestName', $_POST['name'], time() + 2592000, $context->getProperty('uri.blog') . "/");
    }
    if (!empty($_POST['homepage']) && $_POST['homepage'] != 'http://') {
        if (strpos($_POST['homepage'], 'http://') === 0) {
            setcookie('guestHomepage', $_POST['homepage'], time() + 2592000, $context->getProperty('uri.blog') . "/");
        } else {
            setcookie('guestHomepage', 'http://' . $_POST['homepage'], time() + 2592000, $context->getProperty('uri.blog') . "/");
        }
    }
    $comment = array();
    list($comment['entry']) = getCommentAttributes($blogid, $suri['id'], 'entry');
    if (count($comment) == 0) {
        Respond::ErrorPage(_text('댓글이 존재하지 않습니다.'));
    }
    $comment['parent'] = $suri['id'];
    $comment['name'] = empty($_POST['name']) ? '' : trim($_POST['name']);
    $comment['password'] = empty($_POST['password']) ? '' : $_POST['password'];
    $comment['homepage'] = empty($_POST['homepage']) || $_POST['homepage'] == 'http://' ? '' : trim($_POST['homepage']);
    $comment['secret'] = empty($_POST['secret']) ? 0 : 1;
    $comment['comment'] = trim($_POST['comment']);
    $comment['ip'] = $_SERVER['REMOTE_ADDR'];
    if (!doesHaveMembership() && !doesHaveOwnership() && $comment['name'] == '') {
        ?>
<script type="text/javascript">
	//<![CDATA[
		alert("<?php 
        echo _text('이름을 입력해 주십시오.');
        ?>
예제 #5
0
<?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)
require ROOT . '/library/preprocessor.php';
importlib("model.blog.link");
if (!($link = getLink($blogid, $suri['id']))) {
    Respond::ErrorPage(_t('링크 정보가 존재하지 않습니다.'));
}
$method = empty($link['rss']) ? 1 : 0;
require ROOT . '/interface/common/owner/header.php';
$tabsClass['edit'] = true;
?>
						<script type="text/javascript">
							//<![CDATA[
								function getSiteInfo() {
									if(document.getElementById('editForm').rss.value == '') {
										alert("<?php 
echo _t('RSS 주소를 입력해 주십시오.');
?>
\t");
										return false;		
									}
							
									if(document.getElementById('editForm').rss.value.indexOf('http://')==-1) {
										uri = 'http://'+document.getElementById('editForm').rss.value;
									} else {
										uri = document.getElementById('editForm').rss.value;
									}
									var request = new HTTPRequest("GET", "<?php 
예제 #6
0
 function KeylogSkin($filename)
 {
     global $service, $serviceURL;
     if (!($sval = file_get_contents($filename))) {
         Respond::ErrorPage("KeywordSkin");
     }
     $origPath = $serviceURL . substr($filename, strlen(ROOT));
     $origPath = substr($origPath, 0, 0 - strlen(Path::getBaseName($origPath)));
     $sval = str_replace('./', $origPath, $sval);
     replaceSkinTag($sval, 'html');
     replaceSkinTag($sval, 'head');
     replaceSkinTag($sval, 'body');
     list($sval, $this->keylogItem) = $this->cutSkinTag($sval, 'blog_rep');
     list($sval, $this->keylog) = $this->cutSkinTag($sval, 'blog');
     $this->outter = $sval;
 }
예제 #7
0
파일: index.php 프로젝트: ragi79/Textcube
requireStrictRoute();
$ctx = Model_Context::getInstance();
$skin = new Skin($ctx->getProperty('skin.skin'));
$coverpageCount = count($skin->coverpageBasicModules);
$coverpageOrderData = getCoverpageModuleOrderData($coverpageCount);
$coverpageNumber = $_REQUEST['coverpageNumber'];
$modulePos = $_REQUEST['modulePos'];
if ($coverpageNumber < 0 || $coverpageNumber >= $coverpageCount) {
    Respond::ErrorPage();
}
if (!isset($coverpageOrderData[$coverpageNumber]) || !isset($coverpageOrderData[$coverpageNumber][$modulePos])) {
    Respond::ErrorPage();
}
$pluginData = $coverpageOrderData[$coverpageNumber][$modulePos];
if ($pluginData['type'] != 3) {
    Respond::ErrorPage();
}
$plugin = $pluginData['id']['plugin'];
$handler = $pluginData['id']['handler'];
$oldParameters = $pluginData['parameters'];
$title = $plugin . '::' . $handler;
foreach ($coverpageMappings as $sm) {
    if ($sm['plugin'] == $plugin && $sm['handler'] == $handler) {
        $title = $sm['display'] . '::' . $sm['title'];
    }
}
$identifier = $plugin . '/' . $handler;
$parameters = array();
foreach ($coverpageMappings as $item) {
    if ($item['plugin'] == $plugin && $item['handler'] == $handler) {
        $parameters = $item['parameters'];
예제 #8
0
파일: index.php 프로젝트: ragi79/Textcube
requireStrictRoute();
$ctx = Model_Context::getInstance();
$skin = new Skin($ctx->getProperty('skin.skin'));
$sidebarCount = count($skin->sidebarBasicModules);
$sidebarOrderData = getSidebarModuleOrderData($sidebarCount);
$sidebarNumber = $_REQUEST['sidebarNumber'];
$modulePos = $_REQUEST['modulePos'];
if ($sidebarNumber < 0 || $sidebarNumber >= $sidebarCount) {
    Respond::ErrorPage(null, null, null, $ajaxcall);
}
if (!isset($sidebarOrderData[$sidebarNumber]) || !isset($sidebarOrderData[$sidebarNumber][$modulePos])) {
    Respond::ErrorPage(null, null, null, $ajaxcall);
}
$pluginData = $sidebarOrderData[$sidebarNumber][$modulePos];
if ($pluginData['type'] != 3) {
    Respond::ErrorPage(null, null, null, $ajaxcall);
}
$plugin = $pluginData['id']['plugin'];
$handler = $pluginData['id']['handler'];
$oldParameters = $pluginData['parameters'];
$title = $plugin . '::' . $handler;
foreach ($sidebarMappings as $sm) {
    if ($sm['plugin'] == $plugin && $sm['handler'] == $handler) {
        $title = $sm['display'] . '::' . $sm['title'];
    }
}
$identifier = $plugin . '/' . $handler;
$parameters = array();
foreach ($sidebarMappings as $item) {
    if ($item['plugin'] == $plugin && $item['handler'] == $handler) {
        $parameters = $item['parameters'];