function getUserSettingGlobal($name, $default = null, $userid = null)
 {
     return Setting::getUserSettingGlobal($name, $default, $userid);
 }
 function getUserSetting($name, $default = null, $global = null)
 {
     if (is_null($global)) {
         $name = 'plugin_' . $name;
     }
     return Setting::getUserSettingGlobal($name, $default);
 }
Beispiel #3
0
 static function getHomepage($userid = null)
 {
     if (!isset($userid) || empty($userid)) {
         $userid = getUserId();
     }
     $info = unserialize(Setting::getUserSettingGlobal('userLinkInfo', '', $userid));
     if (is_null($info)) {
         $info = array('type' => 'default');
     }
     switch ($info['type']) {
         case "external":
             $homepage = $info['url'];
             break;
         case "internal":
             $homepage = getDefaultURL($info['blogid']);
             break;
         case "author":
             $homepage = getDefaultURL($info['blogid']) . "/author/" . URL::encode(User::getName($userid));
             break;
         case "default":
         default:
             $homepage = null;
     }
     return $homepage;
 }
Beispiel #4
0
        ?>
"><?php 
        echo $row['loginid'];
        ?>
</a></td>
						<td><?php 
        echo $row['name'];
        ?>
</td>
						<td><?php 
        echo $row['lastlogin'] ? date("Y/m/d H:i:s T", $row['lastlogin']) : '<span class="warning">' . _t('아직 로그인하지 않았습니다.') . '</span>';
        ?>
</td>
						<td><?php 
        if (empty($row['lastlogin']) || null !== Setting::getUserSettingGlobal('AuthToken', null, $row['userid'])) {
            echo Setting::getUserSettingGlobal('AuthToken', null, $row['userid']);
        }
        ?>
</td>
					</tr>
<?php 
    }
}
?>
				</tbody>
			</table>
		</div>
	</div>
	
<?php 
$paging = array('url' => "", 'prefix' => '?page=', 'postfix' => '', 'total' => 0, 'pages' => 0, 'page' => 0);
Beispiel #5
0
function validateAPIKey($blogid, $loginid, $key)
{
    $userid = User::getUserIdByEmail($loginid);
    if ($userid === false) {
        return false;
    }
    $currentAPIKey = Setting::getUserSettingGlobal('APIKey', null, $userid);
    if ($currentAPIKey == null) {
        if (!User::confirmPassword($userid, $key)) {
            header('HTTP/1.1 403 Forbidden');
            exit;
        }
    } else {
        if ($currentAPIKey != $key) {
            header('HTTP/1.1 403 Forbidden');
            exit;
        }
    }
    return true;
}
Beispiel #6
0
									<?php 
echo _t('현재의 모든 데이터를 TTXML형태의 백업파일로 보관합니다.<br />첨부파일을 포함시킬 수 있으며, 복원할 경우 자동으로 첨부파일이 처리됩니다.<br />백업파일은 서버에 저장하거나 다운받으실 수 있습니다.');
?>
								</p>
							</div>
<?php 
if (file_exists(__TEXTCUBE_CACHE_DIR__ . "/backup/{$blogid}.xml")) {
    $fileTime = Timestamp::format5(filectime(__TEXTCUBE_CACHE_DIR__ . "/backup/{$blogid}.xml"));
    ?>
							<div class="notification-box">
								<p><?php 
    echo _f('서버에 %1에 백업한 파일이 존재합니다.', $fileTime);
    ?>
</p>
<?php 
    $apikey = Setting::getUserSettingGlobal('APIKey', null, getUserId());
    if ($apikey != null) {
        ?>
								<p>
									 <?php 
        echo _t('복원을 위하여 외부에서 백업 파일에 접근하려면 아래의 주소를 이용하세요.');
        ?>
</p>
								<p class="url"><?php 
        echo $context->getProperty('uri.default') . "/ttxml?loginid=" . User::getEmail(getUserId()) . "&key=" . $apikey;
        ?>
</p>
<?php 
    } else {
        ?>
								<p>
Beispiel #7
0
/// 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';
$context = Model_Context::getInstance();
$context->setProperty('service.admin_script', 'control.js');
require ROOT . '/interface/common/control/header.php';
requirePrivilege('group.creators');
$uid = $suri['id'];
$usersetting = User::getInfo($uid);
$pool = DBModel::getInstance();
$pool->init("Privileges");
$pool->setQualifier("acl & " . BITWISE_OWNER, "neq", 0);
$pool->setQualifier("blogid", "eq", $blogid);
$usersetting['owner'] = $pool->getCell("userid");
$AuthToken = Setting::getUserSettingGlobal('AuthToken', null, $uid);
?>
						<script type="text/javascript"> 
						//<![CDATA[

						function makeToken(uid) {
							var request = new HTTPRequest("<?php 
echo $context->getProperty('uri.blog');
?>
/control/action/user/makeToken/?userid="+uid);
							request.onSuccess = function() {
								alert("<?php 
echo _t('임시 암호가 설정되었습니다.');
?>
");
								window.location.reload();
Beispiel #8
0
										<th class="site"><span class="text"><?php 
echo _t('오픈아이디');
?>
</span></th>
										<th class="site"><span class="text"><?php 
echo _t('삭제');
?>
</span></th>
									</tr>
								</thead>
								<tbody>
<?php 
$currentOpenID = Acl::getIdentity('openid');
$openid_list = array();
for ($i = 0; $i < OPENID_REGISTERS; $i++) {
    $openid_identity = Setting::getUserSettingGlobal("openid." . $i);
    if (!empty($openid_identity)) {
        array_push($openid_list, $openid_identity);
    }
}
for ($i = 0; $i < count($openid_list); $i++) {
    $className = $i % 2 == 1 ? 'even-line' : 'odd-line';
    $className .= $i == count($openid_list) - 1 ? ' last-line' : '';
    ?>
									<tr class="<?php 
    echo $className;
    ?>
 inactive-class" onmouseover="rolloverClass(this, 'over')" onmouseout="rolloverClass(this, 'out')">
										<td><?php 
    echo $openid_list[$i];
    ?>