예제 #1
0
function TestSuite_upgrade_repos_via_user()
{
    if (doesHaveOwnership()) {
        $result = TestSuite_upgrade_repos(null, null);
        if ($result) {
            Respond::ResultPage(0);
        }
    }
    Respond::Resultpage(-1);
}
 public function process()
 {
     $context = \CADB\Model\Context::instance();
     if ($this->params['request_URI']) {
         $redirect_uri .= "?requestURI=" . rawurldecode($this->params['request_URI']);
     }
     if ($this->params['output'] != "json" && $this->params['output'] != "xml") {
         \CADB\Lib\importResource('app-login', true);
     }
     if (\CADB\Lib\doesHaveMembership()) {
         if ($this->params['output'] == "xml") {
             Respond::ResultPage(array(2, "이미 로그인하셨습니다"));
         } else {
             if ($this->params['output'] == "json") {
                 RespondJson::ResultPage(array(2, "이미 로그인하셨습니다"));
             } else {
                 Respond::ResultPage(array(-3, "이미 로그인하셨습니다."));
             }
         }
     }
     $this->title = $context->getProperty('service.title') . " 로그인";
 }
예제 #3
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)
$IV = array('POST' => array('adminSkin' => array('directory', 'default' => 'default')));
require ROOT . '/library/preprocessor.php';
if (empty($_POST['adminSkin']) || !file_exists(ROOT . "/skin/admin/{$_POST['adminSkin']}/index.xml") || !Setting::setBlogSettingGlobal("adminSkin", $_POST['adminSkin'])) {
    Respond::ResultPage(false);
} else {
    Respond::ResultPage(true);
}
예제 #4
0
/// 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';
$IV = array('GET' => array('user' => array('email'), 'blogid' => array('id')));
requireStrictRoute();
requirePrivilege('group.creators');
$userid = User::getUserIdByEmail($_GET['user']);
$bid = $_GET['blogid'];
if (empty($userid)) {
    Respond::ResultPage(array(-1, "존재하지 않는 사용자"));
}
$pool = DBModel::getInstance();
$pool->init("Privileges");
$pool->setQualifier("blogid", "eq", $bid);
$pool->setQualifier("userid", "eq", $userid);
$acl = $pool->getCell("acl");
if ($acl === null) {
    // If there is no ACL, add user into the blog.
    $pool->init("Privileges");
    $pool->setAttribute("blogid", $bid);
    $pool->setAttribute("userid", $userid);
    $pool->setAttribute("acl", 0);
    $pool->setAttribute("created", Timestamp::getUNIXtime());
    $pool->setAttribute("lastlogin", 0);
    $pool->insert();
    Respond::ResultPage(0);
} else {
    Respond::ResultPage(array(-2, "이미 참여중인 사용자"));
}
예제 #5
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)
require ROOT . '/library/preprocessor.php';
requireStrictRoute();
Respond::ResultPage(markAsReadAll($blogid));
예제 #6
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('name' => array('directory', 'default' => null)));
require ROOT . '/library/preprocessor.php';
requireStrictRoute();
if (!empty($_POST['name']) && activatePlugin($_POST['name'])) {
    Respond::ResultPage(0);
}
Respond::ResultPage(1);
예제 #7
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)
$IV = array('POST' => array('id' => array('id')));
require ROOT . '/library/preprocessor.php';
requireStrictRoute();
Respond::ResultPage(markAsUnread($blogid, $_POST['id']));
예제 #8
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)
require ROOT . '/library/preprocessor.php';
Respond::ResultPage(Setting::setBlogSettingGlobal($_POST['name'], $_POST['value']));
예제 #9
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)
$IV = array('POST' => array('url' => array('url', 'default' => null)));
require ROOT . '/library/preprocessor.php';
importlib("model.blog.remoteresponse");
requireStrictRoute();
/// First, detect trackback URL from RDF information.
$info = getRDFfromURL($_POST['url']);
if (empty($info)) {
    $blogInfo = getInfoFromURL($_POST['url']);
    if (!empty($blogInfo) && $blogInfo['service'] != null) {
        $info['trackbackURL'] = getTrackbackURLFromInfo($_POST['url'], $blogInfo['service']);
    } else {
        Respond::ResultPage(false);
        exit;
    }
}
Respond::ResultPage(!empty($_POST['url']) && sendTrackback($blogid, $suri['id'], trim($info['trackbackURL'])));
예제 #10
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('updatecycle' => array('int', 0), 'feedlife' => array('int', 0), 'loadimage' => array(array('1', '2')), 'allowscript' => array(array('1', '2')), 'newwindow' => array(array('1', '2'))));
require ROOT . '/library/preprocessor.php';
requireStrictRoute();
Respond::ResultPage(setReaderSetting($blogid, $_POST));
    static function ErrorPage($message = null, $buttonValue = null, $buttonLink = null, $isAjaxCall = false)
    {
        global $service;
        if ($isAjaxCall) {
            Respond::ResultPage(-1);
            exit;
        }
        ?>
<!DOCTYPE html>
<html>
<head>
	<title><?php 
        echo TEXTCUBE_NAME;
        ?>
</title>
	<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" type="text/css" href="<?php 
        echo $service['path'];
        ?>
/resources/style/owner.css" />
	<script type="text/javascript">
	//<![CDATA[
		var scope = (window.location !== window.parent.location ? window.parent : window);
	//]]>
	</script>
</head>
<body id="body-message-page">
	<div class="message-box">
		<h1><?php 
        echo TEXTCUBE_NAME;
        ?>
</h1>

		<div class="message"><?php 
        echo $message;
        ?>
</div>
		<div class="button-box">
			<input type="button" class="input-button" value="<?php 
        echo !empty($buttonValue) ? $buttonValue : _text('이전');
        ?>
" onclick="<?php 
        echo !empty($buttonLink) ? 'scope.location.href=\'' . $buttonLink . '\'' : 'scope.history.go(-1)';
        ?>
" />
		</div>
	</div>
</body>
</html>
<?php 
        exit;
    }
예제 #12
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)
$IV = array('POST' => array('id' => array('int', 'min' => 0), 'name' => array('string', 'min' => 0, 'max' => 255), 'rss' => array('string', 'min' => 0, 'max' => 255, 'mandatory' => false), 'url' => array('string', 'min' => 0, 'max' => 255), 'category' => array('int', 'mandatory' => false), 'newCategory' => array('string', 'mandatory' => false)));
require ROOT . '/library/preprocessor.php';
importlib("model.blog.link");
requireStrictRoute();
Respond::ResultPage(updateLink($blogid, $_POST));
예제 #13
0
function getTeamContentsSave($target)
{
    $pool = DBModel::getInstance();
    $flag = isset($_POST['flag']) ? $_POST['flag'] : '';
    $style = isset($_POST['fontstyle']) ? $_POST['fontstyle'] : '';
    $profile = isset($_POST['profile']) ? $_POST['profile'] : '';
    if (doesHaveOwnership() && doesHaveMembership()) {
        if ($flag == "style") {
            $pool->reset("TeamUserSettings");
            $pool->setAttribute("style", $style, true);
            $pool->setAttribute("updated", Timestamp::getUNIXtime());
            $pool->setQualifier("blogid", "eq", getBlogId());
            $pool->setQualifier("userid", "eq", getUserId());
            if ($pool->update()) {
                Respond::ResultPage(0);
            }
        } else {
            if ($flag == "profile") {
                $profile = Utils_Unicode::lessenAsEncoding($profile, 65535);
                $pool->reset("TeamUserSettings");
                $pool->setAttribute("profile", $profile, true);
                $pool->setAttribute("updated", Timestamp::getUNIXtime());
                $pool->setQualifier("blogid", "eq", getBlogId());
                $pool->setQualifier("userid", "eq", getUserId());
                if ($pool->update()) {
                    Respond::ResultPage(0);
                }
            }
        }
        Respond::ResultPage(-1);
    }
}
예제 #14
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('id' => array('id'), 'name' => array('string', 'min' => 0, 'max' => 255)));
require ROOT . '/library/preprocessor.php';
requireModel("blog.link");
requireStrictRoute();
Respond::ResultPage(updateLinkCategory($blogid, $_POST));
예제 #15
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)
$IV = array('POST' => array('name' => array('string'), 'rss' => array('string', 'default' => ''), 'url' => array('string'), 'category' => array('int', 'mandatory' => false), 'newCategory' => array('string', 'mandatory' => false)));
require ROOT . '/library/preprocessor.php';
importlib("model.blog.link");
requireStrictRoute();
if (strpos($_POST['rss'], 'http://') !== 0) {
    $_POST['rss'] = 'http://' . $_POST['rss'];
}
if (strpos($_POST['url'], 'http://') !== 0) {
    $_POST['url'] = 'http://' . $_POST['url'];
}
Respond::ResultPage(addLink($blogid, $_POST));
예제 #16
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)
$IV = array('POST' => array('names' => array('string', 'default' => null)));
require ROOT . '/library/preprocessor.php';
importlib("model.blog.attachment");
requireStrictRoute();
if (!empty($_POST['names']) && deleteAttachmentMulti($blogid, $suri['id'], $_POST['names'])) {
    Respond::ResultPage(0);
} else {
    Respond::ResultPage(-1);
}
예제 #17
0
파일: index.php 프로젝트: ragi79/Textcube
function getTeamContentsSave($target)
{
    global $database;
    $flag = isset($_POST['flag']) ? $_POST['flag'] : '';
    $style = isset($_POST['fontstyle']) ? $_POST['fontstyle'] : '';
    $profile = isset($_POST['profile']) ? $_POST['profile'] : '';
    if (doesHaveOwnership() && doesHaveMembership()) {
        if ($flag == "style") {
            if (POD::execute("UPDATE {$database['prefix']}TeamUserSettings SET style=\"{$style}\", updated=UNIX_TIMESTAMP() WHERE blogid=" . getBlogId() . " and userid=" . getUserId())) {
                Respond::ResultPage(0);
            }
        } else {
            if ($flag == "profile") {
                $profile = POD::escapeString(Utils_Unicode::lessenAsEncoding($profile, 65535));
                if (POD::execute("UPDATE {$database['prefix']}TeamUserSettings SET profile=\"{$profile}\", updated=UNIX_TIMESTAMP() WHERE blogid=" . getBlogId() . " and userid=" . getUserId())) {
                    Respond::ResultPage(0);
                }
            }
        }
        Respond::ResultPage(-1);
    }
}
예제 #18
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)
$IV = array('GET' => array('url' => array('url', 'default' => null)));
require ROOT . '/library/preprocessor.php';
importlib("model.blog.remoteresponse");
requireStrictRoute();
Respond::ResultPage(!empty($_GET['url']) && sendTrackback($blogid, $suri['id'], trim($_GET['url'])));
예제 #19
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");
requireStrictRoute();
Respond::ResultPage(deleteLink($blogid, $suri['id']));
예제 #20
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)
$IV = array('GET' => array('owner' => array('id'), 'blogid' => array('id')));
require ROOT . '/library/preprocessor.php';
requireStrictRoute();
requirePrivilege('group.creators');
if (changeBlogOwner($_GET['blogid'], $_GET['owner'])) {
    return Respond::ResultPage(true);
}
Respond::ResultPage(false);
예제 #21
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)
$IV = array('POST' => array('password' => array('string', 'mandatory' => false)));
require ROOT . '/library/preprocessor.php';
importlib("model.blog.entry");
requireStrictRoute();
Respond::ResultPage(protectEntry($suri['id'], isset($_POST['password']) ? $_POST['password'] : ''));
예제 #22
0
    if (!Acl::check("group.editors")) {
        if (getUserIdOfEntry(getBlogId(), $suri['id']) != getUserId()) {
            Respond::ResultPage(-1);
            exit;
        }
    }
    if ($isAjaxRequest) {
        if (deleteEntry($blogid, $suri['id']) === true) {
            Respond::ResultPage(0);
        } else {
            Respond::ResultPage(-1);
        }
    } else {
        deleteEntry($blogid, $suri['id']);
        header("Location: " . $_SERVER['HTTP_REFERER']);
    }
} else {
    foreach (explode(',', $_POST['targets']) as $target) {
        // TeamBlog check
        if (!Acl::check('group.writers', 'entry.delete.' . $target)) {
            if (getUserIdOfEntry(getBlogId(), $suri['id']) != getUserId()) {
                Respond::ResultPage(-1);
                exit;
            }
        }
        if (!deleteEntry($blogid, $target)) {
            Respond::ResultPage(-1);
        }
    }
    Respond::ResultPage(0);
}
예제 #23
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)
$IV = array('POST' => array('homepage' => array('url', 'mandatory' => false), 'type' => array('string'), 'blogid' => array('id')));
require ROOT . '/library/preprocessor.php';
requireStrictRoute();
if (User::setHomepage($_POST['type'], $_POST['homepage'], $_POST['blogid'])) {
    $result = 0;
} else {
    $result = -1;
}
//TODO : 현재 checkAjaxRequest가 동작하지 않으므로 관련부분 주석처리
//if ( checkAjaxRequest() ) {
Respond::ResultPage($result);
/*}
else {
	if (!$result) {
		$message = '대표 주소를 변경하였습니다.';
	}
	else {
		$message = '대표 주소 변경에 실패 하였습니다.';
	}
	Respond::NoticePage($message, $context->getProperty('uri.blog')."/owner/setting/account");
}
*/
예제 #24
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)
$IV = array('POST' => array('id' => array('id')));
require ROOT . '/library/preprocessor.php';
requireStrictRoute();
Respond::ResultPage(markAsStar($blogid, $_POST['id'], true));
    function ErrorPage($message = NULL, $buttonValue = NULL, $buttonLink = NULL, $isAjaxCall = false)
    {
        global $service;
        if ($isAjaxCall) {
            Respond::ResultPage(-1);
            exit;
        }
        ?>
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko">
	<head>
		<title><?php 
        echo TEXTCUBE_NAME;
        ?>
</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel="stylesheet" type="text/css" href="<?php 
        echo $service['path'];
        ?>
/resources/style/owner.css" />
	</head>
	<body id="body-message-page">
		<div class="message-box">
			<h1><?php 
        echo TEXTCUBE_NAME;
        ?>
</h1>
			
			<div class="message"><?php 
        echo $message;
        ?>
</div>
			<div class="button-box">
				<input type="button" class="input-button" value="<?php 
        echo !empty($buttonValue) ? $buttonValue : _text('이전');
        ?>
" onclick="<?php 
        echo !empty($buttonLink) ? 'window.location.href=\'' . $buttonLink . '\'' : 'window.history.go(-1)';
        ?>
" />
			</div>
		</div>
	</body>
	</html>
<?php 
        exit;
    }