• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getBlogId函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getBlogId函数的典型用法代码示例。如果您正苦于以下问题:PHP getBlogId函数的具体用法?PHP getBlogId怎么用?PHP getBlogId使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getBlogId函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: removeAll

 function removeAll($removeAttachments = true)
 {
     global $database;
     $blogid = getBlogId();
     POD::query("UPDATE {$database['prefix']}BlogStatistics SET visits = 0 WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}DailyStatistics WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Categories WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Attachments WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Comments WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}RemoteResponses WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}RemoteResponseLogs WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}TagRelations WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Entries WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Links WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Filters WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}RefererLogs WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}RefererStatistics WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Plugins WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}FeedStarred WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}FeedReads WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}FeedGroupRelations WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}FeedGroups WHERE blogid = {$blogid}");
     if (file_exists(__TEXTCUBE_CACHE_DIR__ . "/rss/{$blogid}.xml")) {
         unlink(__TEXTCUBE_CACHE_DIR__ . "/rss/{$blogid}.xml");
     }
     if ($removeAttachments) {
         Path::removeFiles(Path::combine(ROOT, 'attach', $blogid));
     }
 }
开发者ID:Avantians,项目名称:Textcube,代码行数:29,代码来源:Textcube.Data.php


示例2: open

 function open($filter = '', $fields = 'f.*, g.groupid', $sort = 'id')
 {
     global $database;
     if (is_numeric($filter)) {
         $filter = 'AND id = ' . $filter;
     } else {
         if (!empty($filter)) {
             $filter = 'AND ' . $filter;
         }
     }
     if (!empty($sort)) {
         $sort = 'ORDER BY ' . $sort;
     }
     $this->close();
     $this->_result = POD::query("SELECT {$fields} FROM {$database['prefix']}Feeds f JOIN {$database['prefix']}FeedGroupRelations g ON f.id = g.feed WHERE g.blogid = " . getBlogId() . " {$filter} {$sort}");
     if ($this->_result) {
         if ($this->_count = POD::num_rows($this->_result)) {
             return $this->shift();
         } else {
             POD::free($this->_result);
         }
     }
     unset($this->_result);
     return false;
 }
开发者ID:ni5am,项目名称:Textcube,代码行数:25,代码来源:Textcube.Data.Feed.php


示例3: load

 function load($fields = '*')
 {
     global $database;
     $blogid = getBlogId();
     $this->reset();
     $query = DBModel::getInstance();
     $query->reset('BlogSettings');
     if ($query->doesExist()) {
         $query->setQualifier('blogid', 'equals', $blogid);
         $blogSettings = $query->getAll('name,value');
         if (isset($blogSettings)) {
             foreach ($blogSettings as $blogSetting) {
                 $name = $blogSetting['name'];
                 $value = $blogSetting['value'];
                 switch ($name) {
                     case 'logo':
                         $name = 'banner';
                         break;
                     case 'entriesOnPage':
                         $name = 'postsOnPage';
                         break;
                     case 'entriesOnList':
                         $name = 'postsOnList';
                         break;
                     case 'entriesOnRSS':
                         $name = 'postsOnFeed';
                         break;
                     case 'publishWholeOnRSS':
                         $name = 'publishWholeOnFeed';
                         break;
                     case 'allowWriteOnGuestbook':
                         $name = 'acceptGuestComment';
                         break;
                     case 'allowWriteDblCommentOnGuestbook':
                         $name = 'acceptcommentOnGuestComment';
                         break;
                     case 'defaultDomain':
                     case 'useSloganOnPost':
                     case 'useSloganOnCategory':
                     case 'useSloganOnTag':
                     case 'acceptGuestComment':
                     case 'acceptcommentOnGuestComment':
                         $value = $value ? true : false;
                         break;
                 }
                 $this->{$name} = $value;
             }
         }
         return true;
     }
     return false;
 }
开发者ID:webhacking,项目名称:Textcube,代码行数:52,代码来源:Textcube.Data.BlogSetting.php


示例4: resampleImage

function resampleImage($imgString, $filename, $useAbsolutePath = true)
{
    $blogid = getBlogId();
    $context = Model_Context::getInstance();
    if (!extension_loaded('gd') || !file_exists(ROOT . "/attach/{$blogid}/{$filename}")) {
        return $imgString;
    }
    if (!is_dir(ROOT . "/cache/thumbnail")) {
        @mkdir(ROOT . "/cache/thumbnail");
        @chmod(ROOT . "/cache/thumbnail", 0777);
    }
    if (!is_dir(ROOT . "/cache/thumbnail/" . getBlogId())) {
        @mkdir(ROOT . "/cache/thumbnail/" . getBlogId());
        @chmod(ROOT . "/cache/thumbnail/" . getBlogId(), 0777);
    }
    $origImageSrc = ($useAbsolutePath ? $context->getProperty('uri.service') : $context->getProperty('uri.path')) . "/attach/{$blogid}/{$filename}";
    $tempWidth = $tempHeight = '';
    if (preg_match('/width="([1-9][0-9]*)"/i', $imgString, $temp)) {
        $tempWidth = $temp[1];
    }
    if (preg_match('/height="([1-9][0-9]*)"/i', $imgString, $temp)) {
        $tempHeight = $temp[1];
    }
    if (!empty($tempWidth) && is_numeric($tempWidth) && !empty($tempHeight) && is_numeric($tempHeight)) {
        $resizeImage = getImageResizer($filename, array('width' => $tempWidth, 'height' => $tempHeight, 'absolute' => $useAbsolutePath));
    } else {
        if (!empty($tempWidth) && !is_numeric($tempWidth) && empty($tempHeight)) {
            $resizeImage = getImageResizer($filename, array('width' => $tempWidth, 'absolute' => $useAbsolutePath));
        } else {
            if (empty($tempWidth) && !empty($tempHeight) && is_numeric($tempHeight)) {
                $resizeImage = getImageResizer($filename, array('height' => $tempHeight, 'absolute' => $useAbsolutePath));
            } else {
                return $imgString;
            }
        }
    }
    if ($resizeImage === false) {
        return $imgString;
    }
    if (basename($resizeImage[0]) == $filename) {
        return $imgString;
    }
    $resizeImageSrc = $resizeImage[0];
    $resizeImageWidth = $resizeImage[1];
    $resizeImageHeight = $resizeImage[2];
    $imgString = preg_replace('/src="([^"]+)"/i', 'src="' . $resizeImageSrc . '"', $imgString);
    $imgString = preg_replace('/width="([^"]+)"/i', 'width="' . $resizeImageWidth . '"', $imgString);
    $imgString = preg_replace('/height="([^"]+)"/i', 'height="' . $resizeImageHeight . '"', $imgString);
    $imgString = preg_replace('/onclick="open_img\\(\'([^\']+)\'\\)"/', "onclick=\"open_img('{$origImageSrc}')\"", $imgString);
    return $imgString;
}
开发者ID:hinablue,项目名称:TextCube,代码行数:51,代码来源:image.php


示例5: FM_Modern_editorinit

function FM_Modern_editorinit($editor)
{
    global $entry;
    $context = Model_Context::getInstance();
    $blogid = getBlogId();
    if (is_null($context->getProperty('plugin.config', null))) {
        $config = array('paragraphdelim' => 'BR', 'defaultmode' => 'WYSIWYG');
    } else {
        $config = $context->getProperty('plugin.config');
    }
    if (in_array(Setting::getBlogSettingGlobal('defaultFormatter', 'html'), array('markdown', 'textile')) || in_array($entry['contentformatter'], array('markdown', 'textile'))) {
        $config['defaultmode'] = 'TEXTAREA';
    } else {
        if (!isset($config['defaultmode'])) {
            $config['defaultmode'] = 'WYSIWYG';
        }
    }
    ob_start();
    ?>
			if (typeof(document.execCommand) == "undefined" || !(STD.isIE || STD.isFirefox || (STD.isWebkit && STD.engineVersion >= 419.3))) return null;
			var editor = new TTModernEditor();
			editor.fixPosition = <?php 
    echo Setting::getBlogSettingGlobal('editorPropertyPositionFix', 0);
    ?>
;
			editor.hasGD = <?php 
    echo extension_loaded('gd') ? 'true' : 'false';
    ?>
;
			editor.propertyFilePath = "<?php 
    echo $context->getProperty('service.path');
    ?>
/attach/<?php 
    echo $blogid;
    ?>
/";
			editor.editMode = "<?php 
    echo $config['defaultmode'];
    ?>
";
			editor.newLineToParagraph = <?php 
    echo isset($config['paragraphdelim']) && $config['paragraphdelim'] == 'P' ? 'true' : 'false';
    ?>
;
			return editor;
<?php 
    $result = ob_get_contents();
    ob_end_clean();
    return $result;
}
开发者ID:Avantians,项目名称:Textcube,代码行数:50,代码来源:index.php


示例6: Xquared_editorinit

function Xquared_editorinit($editor)
{
    global $configVal, $entry, $pluginURL;
    $blogid = getBlogId();
    if (is_null($configVal) || empty($configVal)) {
        $config = array('paragraphdelim' => 'BR', 'defaultmode' => 'WYSIWYG');
    } else {
        $config = Setting::fetchConfigVal($configVal);
    }
    if (in_array(Setting::getBlogSettingGlobal('defaultFormatter', 'html'), array('markdown', 'textile')) || in_array($entry['contentformatter'], array('markdown', 'textile'))) {
        $config['defaultmode'] = 'TEXTAREA';
    } else {
        if (!isset($config['defaultmode'])) {
            $config['defaultmode'] = 'WYSIWYG';
        }
    }
    ob_start();
    ?>
			var editor = new xq.Editor("editWindow");
			editor.config.contentCssList = ["<?php 
    echo $pluginURL;
    ?>
/stylesheets/xq_contents.css"];
			editor.config.imagePathForDefaultToolbar = '<?php 
    echo $pluginURL;
    ?>
/images/toolbar/';
			editor.setEditMode('wysiwyg');
			editor.origInitialize = editor.initialize;
			editor.origFinalize = editor.finalize;
			editor.initialize = function() {
				this.origInitialize();
			}
			editor.finalize = function() {
				this.origFinalize();
			}
			editor.syncTextarea = function(){
				var oForm = document.getElementById('editor-form');
				oForm.content.value = this.getCurrentContent();
			}

			return editor;
<?php 
    $result = ob_get_contents();
    ob_end_clean();
    return $result;
}
开发者ID:ragi79,项目名称:Textcube,代码行数:47,代码来源:index.php


示例7: removeAll

 function removeAll($removeAttachments = true)
 {
     global $database;
     $blogid = getBlogId();
     $tags = POD::queryColumn("SELECT DISTINCT tag FROM {$database['prefix']}TagRelations WHERE blogid = {$blogid}");
     POD::query("UPDATE {$database['prefix']}BlogStatistics SET visits = 0 WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}DailyStatistics WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Categories WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Attachments WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Comments WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}CommentsNotified WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}RemoteResponses WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}RemoteResponseLogs WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}TagRelations WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Entries WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}LinkCategories WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Links WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}RefererLogs WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}RefererStatistics WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Plugins WHERE blogid = {$blogid}");
     //POD::query("DELETE FROM {$database['prefix']}UserSettings WHERE user = $blogid");
     POD::query("DELETE FROM {$database['prefix']}Filters WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}FeedStarred WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}FeedReads WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}FeedGroupRelations WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}FeedGroups WHERE blogid = {$blogid} AND id <> 0");
     if (count($tags) > 0) {
         $tagliststr = implode(', ', $tags);
         $nottargets = POD::queryColumn("SELECT DISTINCT tag FROM {$database['prefix']}TagRelations WHERE tag in ( {$tagliststr} )");
         if (count($nottargets) > 0) {
             $nottargetstr = implode(', ', $nottargets);
             POD::execute("DELETE FROM {$database['prefix']}Tags WHERE id IN ( {$tagliststr} ) AND id NOT IN ( {$nottargetstr} )");
         } else {
             POD::execute("DELETE FROM {$database['prefix']}Tags WHERE id IN ( {$tagliststr} ) ");
         }
     }
     if (file_exists(__TEXTCUBE_CACHE_DIR__ . "/rss/{$blogid}.xml")) {
         unlink(__TEXTCUBE_CACHE_DIR__ . "/rss/{$blogid}.xml");
     }
     if ($removeAttachments) {
         Path::removeFiles(Path::combine(ROOT, 'attach', $blogid));
         POD::query("UPDATE {$database['prefix']}BlogSettings SET logo = '' WHERE blogid = {$blogid}");
     }
 }
开发者ID:ragi79,项目名称:Textcube,代码行数:44,代码来源:Textcube.Data.DataMaintenance.php


示例8: KeywordUI_bindTag

function KeywordUI_bindTag($target, $mother)
{
    global $blogURL, $pluginURL, $configVal;
    requireModel('blog.keyword');
    $blogid = getBlogId();
    if (isset($mother) && isset($target)) {
        $tagsWithKeywords = array();
        $keywordNames = getKeywordNames($blogid);
        foreach ($target as $tag => $tagLink) {
            if (in_array($tag, $keywordNames) == true) {
                $tagsWithKeywords[$tag] = $tagLink . "<a href=\"#\" class=\"key1\" onclick=\"openKeyword('{$blogURL}/keylog/" . URL::encode($tag) . "'); return false\"><img src=\"" . $pluginURL . "/images/flag_green.gif\" alt=\"Keyword " . $tag . "\"/></a>";
            } else {
                $tagsWithKeywords[$tag] = $tagLink;
            }
        }
        $target = $tagsWithKeywords;
    }
    return $target;
}
开发者ID:ragi79,项目名称:Textcube,代码行数:19,代码来源:index.php


示例9: login

function login($loginid, $password, $expires = null)
{
    $ctx = Model_Context::getInstance();
    $loginid = POD::escapeString($loginid);
    $blogid = getBlogId();
    $userid = Auth::authenticate($blogid, $loginid, $password);
    if ($userid === false) {
        return false;
    }
    if (empty($_POST['save'])) {
        setcookie('TSSESSION_LOGINID', '', time() - 31536000, $ctx->getProperty('service.path') . '/', $ctx->getProperty('service.domain'));
    } else {
        setcookie('TSSESSION_LOGINID', $loginid, time() + 31536000, $ctx->getProperty('service.path') . '/', $ctx->getProperty('service.domain'));
    }
    if (in_array("group.writers", Acl::getCurrentPrivilege())) {
        Session::authorize($blogid, $userid, $expires);
    }
    return true;
}
开发者ID:ni5am,项目名称:Textcube,代码行数:19,代码来源:auth.php


示例10: KeywordUI_bindTag

function KeywordUI_bindTag($target, $mother)
{
    $context = Model_Context::getInstance();
    importlib('model.blog.keyword');
    $blogid = getBlogId();
    $blogURL = $context->getProperty("uri.blog");
    $pluginURL = $context->getProperty("plugin.uri");
    if (isset($mother) && isset($target)) {
        $tagsWithKeywords = array();
        $keywordNames = getKeywordNames($blogid);
        foreach ($target as $tag => $tagLink) {
            if (in_array($tag, $keywordNames) == true) {
                $tagsWithKeywords[$tag] = $tagLink . "<a href=\"#\" class=\"key1\" onclick=\"openKeyword('{$blogURL}/keylog/" . URL::encode($tag) . "'); return false\"><img src=\"" . $pluginURL . "/images/flag_green.gif\" alt=\"Keyword " . $tag . "\"/></a>";
            } else {
                $tagsWithKeywords[$tag] = $tagLink;
            }
        }
        $target = $tagsWithKeywords;
    }
    return $target;
}
开发者ID:Avantians,项目名称:Textcube,代码行数:21,代码来源:index.php


示例11: CT_Statistics_Default

function CT_Statistics_Default($target)
{
    $blogid = getBlogId();
    $stats = Statistics::getStatistics($blogid);
    $target .= '<ul class="CT_Statistics_Default">';
    $target .= '<li class="TotalCount"><h4>Total Counts</h4><div style="text-align:right; width:100%">';
    $target .= '<span style="font-size:200%">';
    $target .= number_format($stats['total']);
    $target .= '</span>';
    $target .= '</div></li>';
    $target .= '<li class="TodayCount"><h4>Today</h4><div style="text-align:right; width:100%">';
    $target .= '<span style="font-size:200%">';
    $target .= number_format($stats['today']);
    $target .= '</span>';
    $target .= '</div></li>';
    $target .= '<li class="YesterdayCount"><h4>Yesterday</h4><div style="text-align:right; width:100%">';
    $target .= '<span style="font-size:200%">';
    $target .= number_format($stats['yesterday']);
    $target .= '</span>';
    $target .= '</div></li>';
    $target .= '</ul>';
    return $target;
}
开发者ID:Avantians,项目名称:Textcube,代码行数:23,代码来源:index.php


示例12: array

<?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' => 1)));
require ROOT . '/library/preprocessor.php';
requireStrictRoute();
$line = Model_Line::getInstance();
$line->reset();
$line->setFilter(array('blogid', 'equals', getBlogId()));
$line->setFilter(array('id', 'equals', $_POST['id']));
if ($line->remove()) {
    fireEvent('DeleteLine', 0, $line);
    Respond::ResultPage(0);
} else {
    fireEvent('DeleteLine', -1, $line);
    Respond::ResultPage(-1);
}
开发者ID:Avantians,项目名称:Textcube,代码行数:19,代码来源:index.php


示例13:

<?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';
if (CacheControl::flushAll(getBlogId())) {
    Respond::ResultPage(0);
} else {
    Respond::ResultPage(-1);
}
开发者ID:webhacking,项目名称:Textcube,代码行数:11,代码来源:index.php


示例14: isset

														<input type="radio" id="publishedPreserve" class="radio" name="published" value="2" <?php 
echo isset($entry['appointed']) ? 'checked="checked"' : '';
?>
 /><label for="publishedPreserve" onclick="document.getElementById('appointed').select()"><?php 
echo _t('예약');
?>
</label>
														<input type="text" id="appointed" class="input-text" name="appointed" value="<?php 
echo Timestamp::format5(isset($entry['appointed']) ? $entry['appointed'] : $entry['published']);
?>
" onfocus="document.getElementById('editor-form').published[document.getElementById('editor-form').published.length - 1].checked = true" onkeypress="return preventEnter(event);" />
													</div>
												</dd>
											</dl>
<?php 
$countResult = POD::queryExistence("SELECT id FROM {$database['prefix']}Entries WHERE blogid = " . getBlogId() . " AND visibility = 3");
?>
											<dl id="status-line" class="line">
												<dt><span class="label"><?php 
echo _t('공개여부');
?>
</span></dt>
												<dd>
													<div id="status-private" class="status-private"><input type="radio" id="visibility_private" class="radio" name="visibility" value="0"<?php 
echo abs($entry['visibility']) == 0 ? ' checked="checked"' : '';
?>
 /><label for="visibility_private"><?php 
echo _t('비공개');
?>
</label></div>
													<div id="status-protected" class="status-protected"<?php 
开发者ID:ragi79,项目名称:Textcube,代码行数:31,代码来源:index.php


示例15: _buildQuery

 function _buildQuery()
 {
     global $database;
     $query = DBModel::getInstance();
     $query->reset('Comments');
     $query->setQualifier('blogid', 'equals', getBlogId());
     $query->setQualifier('entry', 'equals', 0);
     if (isset($this->id)) {
         if (!Validator::number($this->id, 1)) {
             return $this->_error('id');
         }
         $query->setQualifier('id', 'equals', $this->id);
     }
     if (isset($this->parent)) {
         if (!Validator::number($this->parent, 1)) {
             return $this->_error('parent');
         }
     }
     $query->setAttribute('parent', $this->parent);
     if (isset($this->commenter)) {
         if (!Validator::number($this->commenter, 1)) {
             return $this->_error('commenter');
         }
         if (!($this->name = User::getName($this->commenter))) {
             return $this->_error('commenter');
         }
         $query->setAttribute('replier', $this->commenter);
     }
     if (isset($this->name)) {
         $this->name = Utils_Unicode::lessenAsEncoding(trim($this->name), 80);
         if (empty($this->name)) {
             return $this->_error('name');
         }
         $query->setAttribute('name', $this->name, true);
     }
     if (isset($this->openid)) {
         $this->openid = Utils_Unicode::lessenAsEncoding(trim($this->openid), 128);
         if (empty($this->openid)) {
             return $this->_error('openid');
         }
         $query->setAttribute('openid', $this->openid, true);
     }
     if (isset($this->homepage)) {
         $this->homepage = Utils_Unicode::lessenAsEncoding(trim($this->homepage), 80);
         if (empty($this->homepage)) {
             return $this->_error('homepage');
         }
         $query->setAttribute('homepage', $this->homepage, true);
     }
     if (isset($this->ip)) {
         if (!Validator::ip($this->ip)) {
             return $this->_error('ip');
         }
         $query->setAttribute('ip', $this->ip, true);
     }
     if (isset($this->secret)) {
         $query->setAttribute('secret', Validator::getBit($this->secret));
     }
     if (isset($this->content)) {
         $this->content = trim($this->content);
         if (empty($this->content)) {
             return $this->_error('content');
         }
         $query->setAttribute('comment', $this->content, true);
     }
     if (isset($this->written)) {
         if (!Validator::timestamp($this->written)) {
             return $this->_error('written');
         }
         $query->setAttribute('written', $this->written);
     }
     if (isset($this->isfiltered)) {
         $query->setAttribute('isfiltered', Validator::getBit($this->isfiltered));
     }
     if (isset($this->password)) {
         $this->password = Utils_Unicode::lessenAsEncoding($this->password, 32);
         $query->setAttribute('password', $this->password, true);
         $this->password = null;
     }
     return $query;
 }
开发者ID:webhacking,项目名称:Textcube,代码行数:81,代码来源:Textcube.Data.GuestComment.php


示例16: getCurrentPrivilege

 static function getCurrentPrivilege($blogid = null)
 {
     if (is_null($blogid)) {
         $blogid = getBlogId();
     }
     if (Acl::isAvailable($blogid)) {
         return $_SESSION['acl']["blog.{$blogid}"];
     }
     return array();
 }
开发者ID:Avantians,项目名称:Textcube,代码行数:10,代码来源:30-Auth.php


示例17: deleteEntry

    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);
}
开发者ID:webhacking,项目名称:Textcube,代码行数:31,代码来源:index.php


示例18: array

<?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('page' => array('int', 'min' => 1), 'lines' => array('int', 'min' => 1, 'default' => 15), 'category' => array('string', 'mandatory' => false), 'keyword' => array('string', 'mandatory' => false)));
require ROOT . '/library/preprocessor.php';
requireStrictRoute();
$conditions = array();
$conditions['blogid'] = getBlogId();
$conditions['page'] = $_POST['page'];
if (isset($_POST['category'])) {
    $conditions['category'] = $_POST['category'];
}
if (isset($_POST['keyword'])) {
    $conditions['keyword'] = $_POST['keyword'];
}
$conditions['linesforpage'] = $_POST['lines'];
$d = _t('삭제');
$conditions['template'] = <<<EOS
\t\t\t<dl id="line_[##_id_##]" class="line">
\t\t\t\t<dt class="date">[##_date_##]</dt>
\t\t\t\t<dd class="content">[##_content_##]</dd>
\t\t\t\t<dd class="permalink"><a href="[##_permalink_##]" class="permalink">at [##_root_##]</a></dd>
\t\t\t\t<dd class="delete input-button" onclick="deleteLine('[##_id_##]');return false;"><span class="text">{$d}</span></dd>
\t\t\t</dl>
EOS;
$conditions['dress'] = array('id' => 'id', 'date' => 'created', 'content' => 'content', 'permalink' => 'permalink', 'root' => 'root');
$line = Model_Line::getInstance();
$contentView = $line->getFormattedList($conditions);
if (empty($contentView)) {
开发者ID:ragi79,项目名称:Textcube,代码行数:31,代码来源:index.php


示例19: define

<?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)
define('NO_SESSION', true);
define('__TEXTCUBE_LOGIN__', true);
define('__TEXTCUBE_CUSTOM_HEADER__', true);
require ROOT . '/library/preprocessor.php';
importlib("model.blog.feed");
requireStrictBlogURL();
$children = array();
$cache = pageCache::getInstance();
$cache->reset('linesRSS');
if (!$cache->load()) {
    $result = getLinesFeed(getBlogId(), 'public', 'rss');
    if ($result !== false) {
        $cache->reset('linesRSS');
        $cache->contents = $result;
        $cache->update();
    }
}
header('Content-Type: application/rss+xml; charset=utf-8');
fireEvent('FeedOBStart');
echo fireEvent('ViewLinesRSS', $cache->contents);
fireEvent('FeedOBEnd');
开发者ID:Avantians,项目名称:Textcube,代码行数:26,代码来源:index.php


示例20: printEntryFileUploadButton

function printEntryFileUploadButton($entryId)
{
    $context = Model_Context::getInstance();
    $blogid = getBlogId();
    ?>
											<script type="text/javascript">
												//<![CDATA[

													var fileUploadNestOriginal = false;

													function makeCrossDamainSubmit(uri,userAgent) {
														var property =new Array();
														property['ie'] = new Array();
														property['ie']['width'] = '225px';
														property['ie']['height'] = '25px';

														property['moz'] = new Array();
														property['moz']['width'] = '215px';
														property['moz']['height'] = '22px';

														property['etc'] = new Array();
														property['etc']['width'] = '240px';
														property['etc']['height'] = '22px';

														if(fileUploadNestOriginal == false) {
															fileUploadNestOriginal = document.getElementById('fileUploadNest').innerHTML;
														}
														var str = '<iframe id="attachHiddenNest" src="' + uri + '" style="display: block; height: ' + property[userAgent]['height']+'; width: ' + property[userAgent]['width'] + ';" frameborder="no" scrolling="no"><\/iframe>';
														document.getElementById('fileUploadNest').innerHTML = str + fileUploadNestOriginal;
														/*if (document.getElementById('attachHiddenNest_' + (attachId - 1))) {
															document.getElementById('attachHiddenNest_' + (attachId - 1)).style.display = "none";
															document.getElementById('attachHiddenNest_' + (attachId - 1)).style.width = 0;
															document.getElementById('attachHiddenNest_' + (attachId - 1)).style.height = 0;
														}
														attachId++;*/
													}

													function refreshUploadButton() {
														if (getUploadObj()) {

														} else {
															if(isIE) {
																makeCrossDamainSubmit(blogURL + "/owner/entry/attach/" + entryManager.entryId,"ie");
															} else if(isMoz) {
																makeCrossDamainSubmit(blogURL + "/owner/entry/attach/" + entryManager.entryId,"moz");
															} else {
																makeCrossDamainSubmit(blogURL + "/owner/entry/attach/" + entryManager.entryId,"etc");
															}
														}
													}
												//]]>
											</script>
										<div id="fileUploadNest" class="container">
											<div id="fileSize">
<?php 
    echo getAttachmentSizeLabel($blogid, $entryId);
    ?>
											</div>
											<div id="fileDownload" class="system-message" style="display: none;"></div>
										</div>
										<script type="text/javascript">
										//<![CDATA[
										if (!DetectFlashVer(8, 0, 0) || !(isIE || isMoz || isMinSafari3) || <?php 
    echo $context->getProperty('service.flashuploader', true) ? 'false' : 'true';
    ?>
) {
											var deleteButtonContainer = document.getElementById('fileUploadNest');
											deleteButtonContainer.innerHTML = '<input type="button" id="deleteBtn" class="input-button" value="<?php 
    echo _t('삭제하기');
    ?>
" onclick="deleteAttachment();return false" />' + deleteButtonContainer.innerHTML;
											deleteButtonContainer.style.marginTop = '5px';
										}
										//]]>
										</script>
<?php 
}
开发者ID:ni5am,项目名称:Textcube,代码行数:77,代码来源:ownerView.php



注:本文中的getBlogId函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getBoardDetails函数代码示例发布时间:2022-05-15
下一篇:
PHP getBlocks函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap