Beispiel #1
0
    exit;
}
$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 
Beispiel #2
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);
require ROOT . '/library/preprocessor.php';
requireView('iphoneView');
list($entryId) = getCommentAttributes($blogid, $suri['id'], 'entry');
printMobileHTMLHeader();
printMobileHTMLMenu('', 'comment');
?>

<div id="comment_<?php 
echo $entryId . "_" . $suri['id'];
?>
" title="Delete <?php 
echo $suri['id'];
?>
" class="panel">
<?php 
if (doesHaveOwnership()) {
    ?>
	<h3 class="title"><?php 
    echo _text('삭제하시겠습니까?');
    ?>
</h3>
	<div class="content">
		<a data-role="button"  data-theme="b" href="<?php 
    echo $blogURL;
    ?>
Beispiel #3
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);
require ROOT . '/library/preprocessor.php';
requireView('mobileView');
requireStrictRoute();
$replyId = $suri['id'];
$IV = array('POST' => array("name_{$replyId}" => array('string', 'default' => null), "password_{$replyId}" => array('string', 'default' => ''), "secret_{$replyId}" => array(array('on'), 'default' => null), "homepage_{$replyId}" => array('string', 'default' => 'http://'), "comment_{$replyId}" => array('string', 'default' => '')));
if (!Validator::validate($IV)) {
    Respond::NotFoundPage();
}
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);