本文整理汇总了PHP中POD::queryCell方法的典型用法代码示例。如果您正苦于以下问题:PHP POD::queryCell方法的具体用法?PHP POD::queryCell怎么用?PHP POD::queryCell使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类POD
的用法示例。
在下文中一共展示了POD::queryCell方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: facebookSocialPlugins
function facebookSocialPlugins($target, $mother)
{
global $database, $suri, $blog, $configVal;
$data = Misc::fetchConfigVal($configVal);
$output = '';
$directive = array('archive', 'category', 'guestbook', 'imageResizer', 'link', 'login', 'logout', 'pannels', 'protected', 'search', 'tag', 'trackback', 'rss', 'atom', 'ientry', 'sync', 'm', 'commentcomment');
if (in_array(str_replace('/', '', $suri['directive']), $directive)) {
return $target;
}
$permalink = $blog['useSloganOnPost'] ? 'entry/' . POD::queryCell("SELECT `slogan` FROM {$database['prefix']}Entries WHERE `id`={$mother} LIMIT 1") : $mother;
$permalink = urlencode(getBlogURL() . '/' . $permalink);
$title = urlencode(POD::queryCell("SELECT `title` FROM {$database['prefix']}Entries WHERE `id`={$mother} LIMIT 1"));
$output = '<div style="margin-top:1em;width:auto;height:auto;clear:both;">';
$__width = !isset($data['content_width']) || (int) $data['content_width'] <= 0 ? 520 : $data['content_width'];
if ($data['like_button']) {
$output .= '<div class="fb-like" data-href="' . $permalink . '" data-send="true" data-width="' . $__width . '" data-show-faces="true"></div>';
}
if ($data['comments']) {
$output .= '<div class="fb-comments" data-href="' . $permalink . '" data-num-posts="2" data-width="' . $__width . '"></div>';
}
if ($data['share']) {
$output .= '<div class="fb-send" data-href="' . $permalink . '"></div>';
}
$output .= '</div><br />';
return $target . $output;
}
示例2: __getPluginConfig
function __getPluginConfig()
{
global $database;
if (defined("__TISTORY__") == true) {
global $__globalCache_data;
if (isset($__globalCache_data['pluginSettings']) && array_key_exists($this->pluginName, $__globalCache_data['pluginSettings'])) {
return $__globalCache_data['pluginSettings'][$this->pluginName];
}
}
$configXml = POD::queryCell("SELECT settings FROM {$database['prefix']}Plugins WHERE blogid = {$this->blogid} AND name = '{$this->pluginName}'");
$t = Setting::fetchConfigVal($configXml);
return false == is_array($t) ? array() : $t;
}
示例3: getEntryFormatterInfo
function getEntryFormatterInfo($id)
{
global $database;
static $info;
if (!Validator::id($id)) {
return NULL;
} else {
if (!isset($info[$id])) {
$query = sprintf('SELECT contentformatter FROM %sEntries WHERE id = %d', $database['prefix'], $id);
$info[$id] = POD::queryCell($query);
}
}
return $info[$id];
}
示例4: CountAndShow
function CountAndShow($target, $mother)
{
global $database, $service, $suri, $blogid;
$now_timestamp = time();
$output = '';
if ($suri['directive'] != "/rss" && $suri['directive'] != "/m" && $suri['directive'] != "/i/entry" && $suri['directive'] != "/atom" && $suri['directive'] != "/sync") {
if (SaveReadToCookie($blogid, $mother)) {
if (!POD::queryCount("UPDATE {$database['prefix']}EntryReadCount SET readcounts = readcounts + 1, lastaccess = {$now_timestamp} WHERE blogid={$blogid} AND id={$mother}")) {
POD::query("INSERT INTO {$database['prefix']}EntryReadCount (blogid, id, readcounts, lastaccess) VALUES ({$blogid}, {$mother}, 1, {$now_timestamp})");
}
}
$readcount = POD::queryCell("SELECT readcounts FROM {$database['prefix']}EntryReadCount WHERE blogid={$blogid} AND id={$mother}");
$output .= "<span class=\"c_cnt\">views: {$readcount} times </span><br />";
}
return $output . $target;
}
示例5: flushEntry
function flushEntry($entryId = null)
{
global $database;
if (empty($entryId)) {
$entryId = '';
} else {
$entryId = $entryId . '\\_';
}
$cache = pageCache::getInstance();
$Entries = POD::queryColumn("SELECT name\n\t\t\tFROM {$database['prefix']}PageCacheLog\n\t\t\tWHERE blogid = " . getBlogId() . "\n\t\t\tAND (name like 'entry\\_" . $entryId . "%' OR name = 'commentRSS_" . $entryId . "')");
CacheControl::purgeItems($Entries);
if (!empty($entryId)) {
$entry = POD::queryCell("SELECT userid, category FROM {$database['prefix']}Entries\n\t\t\t\tWHERE blogid = " . getBlogId() . " AND id = {$entryId}");
if (!empty($entry)) {
CacheControl::flushAuthor($entry['userid']);
CacheControl::flushCategory($entry['category']);
CacheControl::flushDBCache();
}
} else {
CacheControl::flushAuthor();
CacheControl::flushCategory();
CacheControl::flushDBCache();
}
unset($cache);
return true;
}
示例6: flush
}
if (!empty($diff)) {
?>
<script type="text/javascript">
//<![CDATA[
<?php
echo $diff;
?>
//]]>
</script>
<?php
flush();
}
}
setProgress(0, _t('교정 대상을 확인하고 있습니다.'));
$items = 4 + POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}Comments WHERE blogid = {$blogid}") + POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}RemoteResponses WHERE blogid = {$blogid}");
set_time_limit(0);
$item = 0;
$corrected = 0;
$post = new Post();
setProgress($item++ / $items * 100, _t('글의 댓글 정보를 다시 계산해서 저장합니다.'));
$post->updateComments();
setProgress($item++ / $items * 100, _t('글의 걸린글 정보를 다시 계산해서 저장합니다.'));
$post->updateRemoteResponses();
setProgress($item++ / $items * 100, _t('분류의 글 정보를 다시 계산해서 저장합니다.'));
updateEntriesOfCategory($blogid);
setProgress($item++ / $items * 100, _t('태그와 태그 관계 정보를 다시 계산해서 저장합니다.'));
$post->correctTagsAll();
if ($result = POD::query("SELECT id, name, parent, homepage, comment, entry, isfiltered FROM {$database['prefix']}Comments WHERE blogid = {$blogid} and isfiltered = 0")) {
while ($comment = POD::fetch($result)) {
setProgress($item++ / $items * 100, _t('댓글과 방명록 데이터를 교정하고 있습니다.'));
示例7: checkStep
//.........这里部分代码省略.........
" /></a>
</div>
</div>
<?php
} else {
if ($step == 6) {
if ($check) {
if (!empty($_POST['email']) && !empty($_POST['password']) && !empty($_POST['password2']) && ($_POST['type'] == 'single' || !empty($_POST['blog'])) && isset($_POST['name'])) {
if (!preg_match('/^[^@]+@([-a-zA-Z0-9]+\\.)+[-a-zA-Z0-9]+$/', $_POST['email'])) {
$error = 51;
} else {
if ($_POST['password'] != $_POST['password2']) {
$error = 52;
} else {
if ($_POST['type'] != 'single' && !preg_match('/^[a-zA-Z0-9]+$/', $_POST['blog'])) {
$error = 53;
} else {
if (strlen($_POST['password']) < 6 || strlen($_POST['password2']) < 6) {
$error = 54;
} else {
return true;
}
}
}
}
}
} else {
@POD::query('SET CHARACTER SET utf8');
if ($result = @POD::query("SELECT loginid, password, name FROM {$_POST['dbPrefix']}Users WHERE userid = 1")) {
@(list($_POST['email'], $_POST['password'], $_POST['name']) = POD::fetch($result, 'row'));
$_POST['password2'] = $_POST['password'];
POD::free($result);
}
if ($result = @POD::queryCell("SELECT value FROM {$_POST['dbPrefix']}BlogSettings\n\t\t\t\t\t\tWHERE blogid = 1\n\t\t\t\t\t\t\tAND name = 'name'")) {
$_POST['blog'] = $result;
}
}
?>
<input type="hidden" name="step" value="<?php
echo $step;
?>
" />
<input type="hidden" name="mode" value="<?php
echo $_POST['mode'];
?>
" />
<input type="hidden" name="dbms" value="<?php
echo isset($_POST['dbms']) ? $_POST['dbms'] : '';
?>
" />
<input type="hidden" name="dbServer" value="<?php
echo isset($_POST['dbServer']) ? $_POST['dbServer'] : '';
?>
" />
<input type="hidden" name="dbPort" value="<?php
echo isset($_POST['dbPort']) ? $_POST['dbPort'] : '';
?>
" />
<input type="hidden" name="dbName" value="<?php
echo isset($_POST['dbName']) ? $_POST['dbName'] : '';
?>
" />
<input type="hidden" name="dbUser" value="<?php
echo isset($_POST['dbUser']) ? $_POST['dbUser'] : '';
?>
" />
示例8: printRespond
<?php
$row = 25;
$bloglist = POD::queryColumn("SELECT blogid,name FROM `{$database['prefix']}BlogSettings` WHERE name = 'name' ORDER BY blogid ASC LIMIT " . ($page - 1) * $row . " ,{$row}");
$blogcount = POD::queryCount("SELECT blogid FROM `{$database['prefix']}BlogSettings` WHERE name = 'name'");
$pages = (int) (($blogcount - 0.5) / $row) + 1;
if ($pages < $page) {
printRespond(array('error' => -2, 'result' => $pages));
}
if ($bloglist) {
$tempString = "";
foreach ($bloglist as $itemBlogId) {
$result = POD::queryAll("SELECT * FROM `{$database['prefix']}BlogSettings` WHERE blogid = {$itemBlogId}");
foreach ($result as $row) {
$bsetting[$row['name']] = $row['value'];
}
$bsetting['owner'] = POD::queryCell("SELECT userid FROM `{$database['prefix']}Privileges` WHERE acl & " . BITWISE_OWNER . " != 0 AND blogid = " . $itemBlogId);
?>
<tr id="table-blog-list_<?php
echo $itemBlogId;
?>
">
<td>
<?php
echo $itemBlogId;
?>
</td>
<td>
<a href="<?php
echo $context->getProperty('uri.blog');
?>
/control/blog/detail/<?php
示例9: changeACLofUser
function changeACLofUser($blogid, $userid, $ACLtype, $switch)
{
// Change user priviledge on the blog.
global $database;
if (empty($ACLtype) || empty($userid)) {
return false;
}
$acl = POD::queryCell("SELECT acl\n\t\t\t\tFROM {$database['prefix']}Privileges\n\t\t\t\tWHERE blogid={$blogid} and userid={$userid}");
if ($acl === null) {
// If there is no ACL, add user into the blog.
$name = User::getName($userid);
POD::query("INSERT INTO {$database['prefix']}Privileges\n\t\t\t\t\tVALUES({$blogid}, {$userid}, 0, UNIX_TIMESTAMP(), 0)");
$acl = 0;
}
$bitwise = null;
switch ($ACLtype) {
case 'admin':
$bitwise = BITWISE_ADMINISTRATOR;
break;
case 'editor':
$bitwise = BITWISE_EDITOR;
break;
default:
return false;
}
if ($switch) {
$acl |= $bitwise;
} else {
$acl &= ~$bitwise;
}
return POD::execute("UPDATE {$database['prefix']}Privileges\n\t\t\tSET acl = " . $acl . "\n\t\t\tWHERE blogid = " . $blogid . " and userid = " . $userid);
}
示例10: changePassword
function changePassword($userid, $pwd, $prevPwd, $forceChange = false)
{
$pool = DBModel::getInstance();
$pool->reset('UserSettings');
$ctx = Model_Context::getInstance();
if (!strlen($pwd) || !strlen($prevPwd) && !$forceChange) {
return false;
}
if ($forceChange === true) {
$pwd = md5($pwd);
$pool->reset('UserSettings');
$pool->setQualifier('userid', 'eq', $userid);
$pool->setQualifier('name', 'eq', 'AuthToken', true);
@$pool->delete(1);
$pool->reset('Users');
$pool->setAttribute('password', $pwd, true);
$pool->setQualifier('userid', 'eq', $userid);
return $pool->update();
}
if (strlen($prevPwd) == 32 && preg_match('/[0-9a-f]/i', $prevPwd)) {
$secret = '(password = \'' . md5($prevPwd) . "' OR password = '{$prevPwd}')";
} else {
$secret = 'password = \'' . md5($prevPwd) . '\'';
}
$count = POD::queryCell("SELECT count(*) FROM " . $ctx->getProperty('database.prefix') . "Users WHERE userid = {$userid} AND {$secret}");
if ($count == 0) {
return false;
}
$pwd = md5($pwd);
$pool->reset('UserSettings');
$pool->setQualifier('userid', 'eq', $userid);
$pool->setQualifier('name', 'eq', 'AuthToken', true);
@$pool->delete(1);
$pool->reset('Users');
$pool->setQualifier('userid', 'eq', $userid);
$pool->setAttribute('password', $pwd, true);
return $pool->update();
}
示例11: getTrackBacksNextId
function getTrackBacksNextId()
{
global $database;
$maxId = POD::queryCell("SELECT max(id) FROM {$database['prefix']}Trackbacks WHERE blogid = " . getBlogId());
return empty($maxId) ? 1 : $maxId + 1;
}
示例12: updateRandomFeed
function updateRandomFeed()
{
global $database;
$updatecycle = POD::queryCell("SELECT updatecycle FROM {$database['prefix']}FeedSettings LIMIT 1");
if ($updatecycle != 0) {
if ($feed = POD::queryRow("SELECT * FROM {$database['prefix']}Feeds WHERE modified < " . (gmmktime() - $updatecycle * 60) . " ORDER BY RAND() LIMIT 1")) {
Setting::setServiceSetting('lastFeedUpdate', gmmktime(), true);
return array(updateFeed($feed), $feed['xmlurl']);
}
}
return array(1, 'No feeds to update');
}
示例13: setTotalStatistics
static function setTotalStatistics($blogid)
{
global $database;
POD::execute("DELETE FROM {$database['prefix']}DailyStatistics WHERE blogid = {$blogid}");
$prevCount = POD::queryCell("SELECT visits FROM {$database['prefix']}BlogStatistics WHERE blogid = {$blogid}");
if (!is_null($prevCount) && $prevCount == 0) {
return true;
}
if (POD::execute("UPDATE {$database['prefix']}BlogStatistics SET visits = 0 WHERE blogid = {$blogid}")) {
return true;
} else {
$result = POD::execute("INSERT INTO {$database['prefix']}BlogStatistics values({$blogid}, 0)");
return $result;
}
}
示例14: getCommentsNotifiedSiteInfoMaxId
function getCommentsNotifiedSiteInfoMaxId()
{
global $database;
$maxId = POD::queryCell("SELECT max(id)\n\t\tFROM {$database['prefix']}CommentsNotifiedSiteInfo");
return empty($maxId) ? 0 : $maxId;
}
示例15: deleteTagById
function deleteTagById($blogid, $id)
{
global $database;
/// delete relation
$result = POD::execute('DELETE FROM ' . $database['prefix'] . 'TagRelations WHERE blogid = ' . $blogid . ' AND tag = ' . $id);
if (!$result) {
return false;
}
$count = POD::queryCell('SELECT COUNT(*) FROM ' . $database['prefix'] . 'TagRelations WHERE tag = ' . $id);
if (intval($count) == 0) {
POD::execute('DELETE FROM ' . $database['prefix'] . 'Tags WHERE id = ' . $id);
}
return true;
}