Beispiel #1
0
if (empty($suri['id'])) {
    $IV = array('POST' => array('replyId' => array('id'), 'password' => array('string', 'mandatory' => false)));
}
require ROOT . '/library/preprocessor.php';
requireView('mobileView');
requireStrictRoute();
if (empty($suri['id'])) {
    list($entryId) = getCommentAttributes($blogid, $_POST['replyId'], 'entry');
    if (deleteComment($blogid, $_POST['replyId'], $entryId, isset($_POST['password']) ? $_POST['password'] : '') === false) {
        printMobileErrorPage(_text('댓글을 삭제할 수 없습니다.'), _text('비밀번호가 일치하지 않습니다.'), "{$blogURL}/comment/delete/{$_POST['replyId']}");
        exit;
    }
} else {
    list($entryId) = getCommentAttributes($blogid, $suri['id'], 'entry');
    if (deleteComment($blogid, $suri['id'], $entryId, '') === false) {
        printMobileErrorPage(_t('댓글을 삭제할 수 없습니다'), _t('관리자가 아닙니다'), "{$blogURL}/comment/delete/{$suri['id']}");
        exit;
    }
}
list($entries, $paging) = getEntryWithPaging($blogid, $entryId);
$entry = $entries ? $entries[0] : null;
printMobileHtmlHeader();
?>
<div id="content">
	<h2><?php 
echo _t('댓글이 삭제됐습니다');
?>
</h2>
</div>
<?php 
printMobileNavigation($entry);
Beispiel #2
0
if (empty($suri['id'])) {
    $IV = array('POST' => array('replyId' => array('id'), 'password' => array('string', 'mandatory' => false)));
}
require ROOT . '/library/preprocessor.php';
requireView('mobileView');
requireStrictRoute();
if (empty($suri['id'])) {
    list($entryId) = getCommentAttributes($blogid, $_POST['replyId'], 'entry');
    if (deleteComment($blogid, $_POST['replyId'], $entryId, isset($_POST['password']) ? $_POST['password'] : '') === false) {
        printMobileErrorPage(_text('댓글을 삭제할 수 없습니다.'), _text('비밀번호가 일치하지 않습니다.'), $context->getProperty('uri.blog') . "/comment/delete/{$_POST['replyId']}");
        exit;
    }
} else {
    list($entryId) = getCommentAttributes($blogid, $suri['id'], 'entry');
    if (deleteComment($blogid, $suri['id'], $entryId, '') === false) {
        printMobileErrorPage(_t('댓글을 삭제할 수 없습니다'), _t('관리자가 아닙니다'), $context->getProperty('uri.blog') . "/comment/delete/{$suri['id']}");
        exit;
    }
}
list($entries, $paging) = getEntryWithPaging($blogid, $entryId);
$entry = $entries ? $entries[0] : null;
printMobileHtmlHeader();
?>
<div id="content">
	<h2><?php 
echo _t('댓글이 삭제됐습니다');
?>
</h2>
</div>
<?php 
printMobileNavigation($entry);
Beispiel #3
0
}
list($entryId) = getCommentAttributes($blogid, $replyId, 'entry');
if (!doesHaveOwnership() && empty($_POST["name_{$replyId}"])) {
    printMobileErrorPage(_text('댓글을 작성할 수 없습니다.'), _text('이름을 입력해 주십시오.'), "{$blogURL}/comment/comment/{$replyId}");
} else {
    if (!doesHaveOwnership() && empty($_POST["comment_{$replyId}"])) {
        printMobileErrorPage(_text('댓글을 작성할 수 없습니다.'), _text('본문을 입력해 주십시오.'), "{$blogURL}/comment/comment/{$replyId}");
    } else {
        $comment = array();
        $comment['entry'] = $entryId;
        $comment['parent'] = $replyId;
        $comment['name'] = empty($_POST["name_{$replyId}"]) ? '' : $_POST["name_{$replyId}"];
        $comment['password'] = empty($_POST["password_{$replyId}"]) ? '' : $_POST["password_{$replyId}"];
        $comment['homepage'] = empty($_POST["homepage_{$replyId}"]) || $_POST["homepage_{$replyId}"] == 'http://' ? '' : $_POST["homepage_{$replyId}"];
        $comment['secret'] = empty($_POST["secret_{$replyId}"]) ? 0 : 1;
        $comment['comment'] = $_POST["comment_{$replyId}"];
        $comment['ip'] = $_SERVER['REMOTE_ADDR'];
        $result = addComment($blogid, $comment);
        if ($result === 'blocked') {
            printMobileErrorPage(_text('댓글쓰기가 차단됐습니다.'), "{$blogURL}/comment/{$entryId}");
        } else {
            if ($result === false) {
                printMobileErrorPage(_text('댓글을 쓸 수 없습니다.'), "{$blogURL}/comment/{$entryId}");
            } else {
                setcookie('guestName', $comment['name'], time() + 2592000, $blogURL);
                setcookie('guestHomepage', $comment['homepage'], time() + 2592000, $blogURL);
                printMobileSimpleMessage(_text('댓글이 작성됐습니다.'), _text('댓글 보기 화면으로'), "{$blogURL}/comment/{$entryId}");
            }
        }
    }
}
Beispiel #4
0
<?php

/// Copyright (c) 2004-2011, 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_MOBILE__', true);
$IV = array('POST' => array('password' => array('string', 'default' => null)));
require ROOT . '/library/preprocessor.php';
requireView('mobileView');
$entry = getEntry($blogid, $suri['id']);
if (!is_null($entry) && isset($_POST['password']) && $entry['password'] == $_POST['password']) {
    setcookie('GUEST_PASSWORD', $_POST['password'], time() + 86400, "{$blogURL}/");
    header("Location: {$blogURL}/{$suri['id']}");
} else {
    printMobileErrorPage(_text('비밀번호 확인'), _text('패스워드가 틀렸습니다.'), "{$blogURL}/{$suri['id']}");
}
Beispiel #5
0
/// Copyright (c) 2004-2011, 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_MOBILE__', true);
require ROOT . '/library/preprocessor.php';
// Redirect for ipod touch / iPhone
if (strpos($_SERVER['HTTP_USER_AGENT'], 'iPod') || strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')) {
    header("Location: " . $pathURL . getFancyURLpostfix() . "/i");
    exit;
}
requireView('mobileView');
if (empty($suri['id'])) {
    list($entry, $paging) = getEntriesWithPaging($blogid, 1, 1);
    if (empty($entry)) {
        printMobileErrorPage(_text('페이지 오류'), _text('글이 하나도 없습니다.'), $blogURL);
    } else {
        header("Location: {$blogURL}/{$entry[0]['id']}");
    }
} else {
    list($entries, $paging) = getEntryWithPaging($blogid, $suri['id']);
    $entry = $entries ? $entries[0] : null;
    printMobileHtmlHeader();
    ?>
	<div id="content">
		<h2><?php 
    echo htmlspecialchars($entry['title']);
    ?>
</h2>	
		<hr />
		<?php 
Beispiel #6
0
<?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_MOBILE__', true);
$IV = array('POST' => array('password' => array('string', 'default' => null)));
require ROOT . '/library/preprocessor.php';
requireView('mobileView');
$entry = getEntry($blogid, $suri['id']);
if (!is_null($entry) && isset($_POST['password']) && $entry['password'] == $_POST['password']) {
    setcookie('GUEST_PASSWORD', $_POST['password'], time() + 86400, $context->getProperty('uri.blog') . "/");
    header("Location: " . $context->getProperty('uri.blog') . "/" . $suri['id']);
} else {
    printMobileErrorPage(_text('비밀번호 확인'), _text('패스워드가 틀렸습니다.'), $context->getProperty('uri.blog') . "/" . $suri['id']);
}
Beispiel #7
0
/// 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_MOBILE__', true);
require ROOT . '/library/preprocessor.php';
// Redirect for ipod touch / iPhone
if (strpos($_SERVER['HTTP_USER_AGENT'], 'iPod') || strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')) {
    header("Location: " . $context->getProperty('uri.path') . getFancyURLpostfix() . "/i");
    exit;
}
requireView('mobileView');
if (empty($suri['id'])) {
    list($entry, $paging) = getEntriesWithPaging($blogid, 1, 1);
    if (empty($entry)) {
        printMobileErrorPage(_text('페이지 오류'), _text('글이 하나도 없습니다.'), $context->getProperty('uri.blog'));
    } else {
        header("Location: {$context->getProperty}('uri.blog')/{$entry[0]['id']}");
    }
} else {
    list($entries, $paging) = getEntryWithPaging($blogid, $suri['id']);
    $entry = $entries ? $entries[0] : null;
    printMobileHtmlHeader();
    ?>
	<div id="content">
		<h2><?php 
    echo htmlspecialchars($entry['title']);
    ?>
</h2>	
		<hr />
		<?php 
Beispiel #8
0
    if (!doesHaveOwnership() && empty($_POST["comment_{$replyId}"])) {
        printMobileErrorPage(_text('댓글 작성 오류.'), _text('내용을 입력해 주세요.'), "{$blogURL}/comment/comment/{$replyId}");
    } else {
        $comment = array();
        $comment['entry'] = $entryId;
        $comment['parent'] = $replyId;
        $comment['name'] = empty($_POST["name_{$replyId}"]) ? '' : $_POST["name_{$replyId}"];
        $comment['password'] = empty($_POST["password_{$replyId}"]) ? '' : $_POST["password_{$replyId}"];
        $comment['homepage'] = empty($_POST["homepage_{$replyId}"]) || $_POST["homepage_{$replyId}"] == 'http://' ? '' : $_POST["homepage_{$replyId}"];
        $comment['secret'] = empty($_POST["secret_{$replyId}"]) ? 0 : 1;
        $comment['comment'] = $_POST["comment_{$replyId}"];
        $comment['ip'] = $_SERVER['REMOTE_ADDR'];
        $result = addComment($blogid, $comment);
        if (in_array($result, array('ip', 'name', 'homepage', 'comment', 'openidonly', 'etc'))) {
            if ($result == 'openidonly') {
                $blockMessage = _text('댓글을 쓰기 위해서는 OpenID로 로그인해야 합니다.');
            } else {
                $blockMessage = _textf('%1 은 차단되었습니다.', $result);
            }
            printMobileErrorPage(_text('댓글 작성이 차단되었습니다.'), $blockMessage, "{$blogURL}/comment/{$entryId}");
        } else {
            if ($result === false) {
                printMobileErrorPage(_text('댓글 작성 오류.'), _text('댓글을 작성할 수 없었습니다.'), "{$blogURL}/comment/{$entryId}");
            } else {
                setcookie('guestName', $comment['name'], time() + 2592000, $blogURL);
                setcookie('guestHomepage', $comment['homepage'], time() + 2592000, $blogURL);
                printMobileSimpleMessage(_text('댓글이 등록되었습니다.'), _text('댓글 페이지로 이동'), "{$blogURL}/comment/{$entryId}");
            }
        }
    }
}
Beispiel #9
0
<?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);
$IV = array('POST' => array('password' => array('string', 'default' => null)));
require ROOT . '/library/preprocessor.php';
requireView('iphoneView');
$entry = getEntry($blogid, $suri['id']);
if (!is_null($entry) && isset($_POST['password']) && $entry['password'] == $_POST['password']) {
    setcookie('GUEST_PASSWORD', $_POST['password'], time() + 86400, "{$blogURL}/");
    header("Location: {$blogURL}/entry/{$suri['id']}");
} else {
    printMobileErrorPage(_text('Password (again)!'), _text('Wrong password.'), "{$blogURL}/entry/{$suri['id']}");
}
Beispiel #10
0
}
list($entryId) = getCommentAttributes($blogid, $replyId, 'entry');
if (!doesHaveOwnership() && empty($_POST["name_{$replyId}"])) {
    printMobileErrorPage(_text('댓글을 작성할 수 없습니다.'), _text('이름을 입력해 주십시오.'), $context->getProperty('uri.blog') . "/comment/comment/{$replyId}");
} else {
    if (!doesHaveOwnership() && empty($_POST["comment_{$replyId}"])) {
        printMobileErrorPage(_text('댓글을 작성할 수 없습니다.'), _text('본문을 입력해 주십시오.'), $context->getProperty('uri.blog') . "/comment/comment/{$replyId}");
    } else {
        $comment = array();
        $comment['entry'] = $entryId;
        $comment['parent'] = $replyId;
        $comment['name'] = empty($_POST["name_{$replyId}"]) ? '' : $_POST["name_{$replyId}"];
        $comment['password'] = empty($_POST["password_{$replyId}"]) ? '' : $_POST["password_{$replyId}"];
        $comment['homepage'] = empty($_POST["homepage_{$replyId}"]) || $_POST["homepage_{$replyId}"] == 'http://' ? '' : $_POST["homepage_{$replyId}"];
        $comment['secret'] = empty($_POST["secret_{$replyId}"]) ? 0 : 1;
        $comment['comment'] = $_POST["comment_{$replyId}"];
        $comment['ip'] = $_SERVER['REMOTE_ADDR'];
        $result = addComment($blogid, $comment);
        if ($result === 'blocked') {
            printMobileErrorPage(_text('댓글쓰기가 차단됐습니다.'), $context->getProperty('uri.blog') . "/comment/{$entryId}");
        } else {
            if ($result === false) {
                printMobileErrorPage(_text('댓글을 쓸 수 없습니다.'), $context->getProperty('uri.blog') . "/comment/{$entryId}");
            } else {
                setcookie('guestName', $comment['name'], time() + 2592000, $context->getProperty('uri.blog'));
                setcookie('guestHomepage', $comment['homepage'], time() + 2592000, $context->getProperty('uri.blog'));
                printMobileSimpleMessage(_text('댓글이 작성됐습니다.'), _text('댓글 보기 화면으로'), $context->getProperty('uri.blog') . "/comment/{$entryId}");
            }
        }
    }
}
Beispiel #11
0
<?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);
if (empty($suri['id'])) {
    $IV = array('POST' => array('replyId' => array('id'), 'password' => array('string', 'mandatory' => false)));
}
require ROOT . '/library/preprocessor.php';
requireView('iphoneView');
requireStrictRoute();
if (empty($suri['id'])) {
    list($entryId) = getCommentAttributes($blogid, $_POST['replyId'], 'entry');
    if (deleteComment($blogid, $_POST['replyId'], $entryId, isset($_POST['password']) ? $_POST['password'] : '') === false) {
        printMobileErrorPage(_text('댓글을 삭제하지 못했습니다'), _text('비밀번호가 맞지 않습니다.'), "{$blogURL}/comment/delete/{$_POST['replyId']}");
        exit;
    }
} else {
    list($entryId) = getCommentAttributes($blogid, $suri['id'], 'entry');
    if (deleteComment($blogid, $suri['id'], $entryId, '') === false) {
        printMobileErrorPage(_t('댓글을 삭제하지 못했습니다'), _t('관리자 권한이 필요합니다.'), "{$blogURL}/comment/delete/{$suri['id']}");
        exit;
    }
}
list($entries, $paging) = getEntryWithPaging($blogid, $entryId);
$entry = $entries ? $entries[0] : null;
printMobileSimpleMessage(_text('댓글이 삭제되었습니다.'), _text('댓글 페이지로 이동'), "{$blogURL}/comment/{$entryId}");