当前位置: 首页>>代码示例>>PHP>>正文


PHP POD::queryColumn方法代码示例

本文整理汇总了PHP中POD::queryColumn方法的典型用法代码示例。如果您正苦于以下问题:PHP POD::queryColumn方法的具体用法?PHP POD::queryColumn怎么用?PHP POD::queryColumn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在POD的用法示例。


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

示例1: markAsReadAll

function markAsReadAll($blogid)
{
    global $database;
    $registeredFeeds = POD::queryColumn("SELECT feed\n\t\tFROM {$database['prefix']}FeedGroupRelations\n\t\tWHERE blogid = {$blogid}");
    if (isset($registeredFeeds)) {
        $feedItems = array();
        foreach ($registeredFeeds as $feed) {
            /// Gather feed information
            $feedIds = POD::queryColumn("SELECT id FROM {$database['prefix']}FeedItems WHERE feed = {$feed}");
            if (!empty($feedIds)) {
                $feedItems = array_merge($feedItems, $feedIds);
            }
        }
        if (!empty($feedItems)) {
            $readFeedItems = POD::queryColumn("SELECT item FROM {$database['prefix']}FeedReads\n\t\t\t\tWHERE blogid = {$blogid}");
            $unreadFeedItems = array_diff($feedItems, $readFeedItems);
            if (!empty($unreadFeedItems)) {
                foreach ($unreadFeedItems as $item) {
                    POD::execute("INSERT INTO {$database['prefix']}FeedReads (blogid, item) VALUES ({$blogid}, {$item})");
                }
            }
        }
    }
    return true;
}
开发者ID:Avantians,项目名称:Textcube,代码行数:25,代码来源:reader.php

示例2: getRemoteResponseLogsWithPagingForOwner

function getRemoteResponseLogsWithPagingForOwner($blogid, $category, $site, $ip, $search, $page, $count, $type = null)
{
    global $database;
    if (!is_null($type)) {
        $typeFilter = " AND t.responsetype = '" . POD::escapeString($type) . "'";
    } else {
        $typeFilter = '';
    }
    $postfix = '&status=sent';
    $sql = "SELECT t.*, e.title AS subject, c.name AS categoryName \n\t\tFROM {$database['prefix']}RemoteResponseLogs t \n\t\tLEFT JOIN {$database['prefix']}Entries e ON t.blogid = e.blogid AND t.entry = e.id AND e.draft = 0 \n\t\tLEFT JOIN {$database['prefix']}Categories c ON t.blogid = c.blogid AND e.category = c.id \n\t\tWHERE t.blogid = {$blogid} {$typeFilter}";
    if ($category > 0) {
        $categories = POD::queryColumn("SELECT id FROM {$database['prefix']}Categories WHERE blogid = {$blogid} AND parent = {$category}");
        array_push($categories, $category);
        $sql .= ' AND e.category IN (' . implode(', ', $categories) . ')';
        $postfix .= '&category=' . rawurlencode($category);
    } else {
        $sql .= ' AND e.category >= 0';
    }
    if (!empty($search)) {
        $search = escapeSearchString($search);
        $sql .= " AND (e.title LIKE '%{$search}%' OR e.content LIKE '%{$search}%')";
        $postfix .= '&search=' . rawurlencode($search);
    }
    $sql .= ' ORDER BY t.written DESC';
    list($responses, $paging) = Paging::fetch($sql, $page, $count);
    if (strlen($postfix) > 0) {
        $paging['postfix'] .= $postfix . '&withSearch=on';
    }
    return array($responses, $paging);
}
开发者ID:hinablue,项目名称:TextCube,代码行数:30,代码来源:blog.response.remote.php

示例3: getTrashCommentsWithPagingForOwner

function getTrashCommentsWithPagingForOwner($blogid, $category, $name, $ip, $search, $page, $count)
{
    global $database;
    $sql = "SELECT c.*, e.title, c2.name AS parentName \n\t\tFROM {$database['prefix']}Comments c \n\t\tLEFT JOIN {$database['prefix']}Entries e ON c.blogid = e.blogid AND c.entry = e.id AND e.draft = 0 \n\t\tLEFT JOIN {$database['prefix']}Comments c2 ON c.parent = c2.id AND c.blogid = c2.blogid \n\t\tWHERE c.blogid = {$blogid} AND c.isfiltered > 0";
    $postfix = '';
    if ($category > 0) {
        $categories = POD::queryColumn("SELECT id FROM {$database['prefix']}Categories WHERE parent = {$category}");
        array_push($categories, $category);
        $sql .= ' AND e.category IN (' . implode(', ', $categories) . ')';
        $postfix .= '&category=' . rawurlencode($category);
    } else {
        $sql .= ' AND (e.category >= 0 OR c.entry = 0)';
    }
    if (!empty($name)) {
        $sql .= ' AND c.name = \'' . POD::escapeString($name) . '\'';
        $postfix .= '&name=' . rawurlencode($name);
    }
    if (!empty($ip)) {
        $sql .= ' AND c.ip = \'' . POD::escapeString($ip) . '\'';
        $postfix .= '&ip=' . rawurlencode($ip);
    }
    if (!empty($search)) {
        $search = escapeSearchString($search);
        $sql .= " AND (c.name LIKE '%{$search}%' OR c.homepage LIKE '%{$search}%' OR c.comment LIKE '%{$search}%')";
        $postfix .= '&search=' . rawurlencode($search);
    }
    $sql .= ' ORDER BY c.written DESC';
    list($comments, $paging) = Paging::fetch($sql, $page, $count);
    if (strlen($postfix) > 0) {
        $paging['postfix'] .= $postfix . '&withSearch=on';
    }
    return array($comments, $paging);
}
开发者ID:hinablue,项目名称:TextCube,代码行数:33,代码来源:blog.trash.php

示例4: getKeywordNames

function getKeywordNames($blogid)
{
    global $database;
    $names = array();
    $visibility = doesHaveOwnership() ? '' : 'AND visibility > 0';
    $names = POD::queryColumn("SELECT title FROM {$database['prefix']}Entries WHERE blogid = {$blogid} AND draft = 0 {$visibility} AND category = -1 ORDER BY char_length(title) DESC");
    return $names;
}
开发者ID:hinablue,项目名称:TextCube,代码行数:8,代码来源:blog.keyword.php

示例5: queryColumnWithDBCache

 public static function queryColumnWithDBCache($query, $prefix = null, $type = 'both', $count = -1)
 {
     $cache = queryCache::getInstance();
     $cache->reset($query, $prefix);
     if (!$cache->load()) {
         $cache->contents = POD::queryColumn($query, $type, $count);
         $cache->update();
     }
     return $cache->contents;
 }
开发者ID:ragi79,项目名称:Textcube,代码行数:10,代码来源:POD.php

示例6: finish

function finish($error = null)
{
    global $migrational, $blogid, $database;
    ?>
	<script type="text/javascript">
		//<![CDATA[
<?php 
    if ($error) {
        ?>
			//pi.style.backgroundColor = "red";
			alert("<?php 
        echo $error;
        ?>
");
<?php 
    } else {
        ?>
			alert("<?php 
        echo $migrational ? _t('성공적으로 이주되었습니다.') : _t('성공적으로 복원되었습니다.');
        ?>
");
<?php 
    }
    ?>
			window.parent.document.getElementById("progressDialog").style.display = "none";
			window.parent.document.getElementById("progressDialogTitle").innerHTML = "";
			window.parent.document.getElementById("progressText").innerHTML = "";
			window.parent.document.getElementById("progressTextSub").innerHTML = "";
		//]]>
	</script>
<?php 
    $activeEditors = POD::queryColumn("SELECT DISTINCT contenteditor FROM {$database}Entries WHERE blogid = {$blogid}");
    $activeFormatters = POD::queryColumn("SELECT DISTINCT contentformatter FROM {$database}Entries WHERE blogid = {$blogid}");
    if (!empty($activeEditors)) {
        foreach ($activeEditors as $editor) {
            activatePlugin($editor);
        }
    }
    if (!empty($activeFormatters)) {
        foreach ($activeFormatters as $formatter) {
            activatePlugin($formatter);
        }
    }
    echo _t('완료.');
    ?>
</body>
</html>
<?php 
    exit;
}
开发者ID:webhacking,项目名称:Textcube,代码行数:50,代码来源: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: clearCache

function clearCache()
{
    global $database, $changed, $errorlog, $memcache;
    static $isCleared = false;
    if ($isCleared == true) {
        return;
    }
    if (!is_null($blogids = POD::queryColumn("SELECT blogid FROM {$database['prefix']}PageCacheLog"))) {
        $changed = true;
        $errorlog = false;
        echo '<li>', _textf('페이지 캐시를 초기화합니다.'), ': ';
        foreach ($blogids as $ids) {
            if (CacheControl::flushAll($ids) == false) {
                $errorlog = true;
            }
        }
        if ($errorlog == false) {
            echo '<span class="result success">', _text('성공'), '</span></li>';
        } else {
            echo '<span class="result fail">', _text('실패'), '</span></li>';
        }
    }
    if (!is_null($memcache)) {
        echo '<li>', _textf('Memcached 캐시를 초기화합니다.'), ': ';
        if ($memcache->flush()) {
            echo '<span class="result success">', _text('성공'), '</span></li>';
        } else {
            echo '<span class="result fail">', _text('실패'), '</span></li>';
        }
    }
    echo '<li>', _textf('공지사항 캐시를 초기화합니다.'), ': ';
    if (POD::execute("DELETE FROM {$database['prefix']}ServiceSettings WHERE name like 'TextcubeNotice%'")) {
        echo '<span class="result success">', _text('성공'), '</span></li>';
    } else {
        echo '<span class="result fail">', _text('실패'), '</span></li>';
    }
    $isCleared = true;
}
开发者ID:ragi79,项目名称:Textcube,代码行数:38,代码来源:checkup.php

示例9: queryColumnWithDBCache

 function queryColumnWithDBCache($query, $prefix = null, $type = MYSQL_BOTH, $count = -1)
 {
     //		requireComponent('Needlworks.Cache.PageCache');
     $cache = new queryCache($query, $prefix);
     if (!$cache->load()) {
         $cache->contents = POD::queryColumn($query, $type, $count);
         $cache->update();
     }
     return $cache->contents;
 }
开发者ID:ragi79,项目名称:Textcube,代码行数:10,代码来源:POD.Core.php

示例10: array

$IV = array('REQUEST' => array('name' => array('string'), 'type' => array('int', 'min' => 1, 'max' => 2)));
require ROOT . '/library/preprocessor.php';
requireStrictRoute();
if ($blogid != 1) {
    Respond::ResultPage(1);
    exit;
}
requireModel('common.setting');
$definedTables = getDefinedTableNames();
if ($_REQUEST['type'] == 1) {
    // type 1, plugin
    $values = explode('/', $_REQUEST['name'], 2);
    $pluginname = $values[0];
    $version = $values[1];
    $query = "select name from {$database['prefix']}ServiceSettings WHERE value = '" . POD::escapeString($_REQUEST['name']) . "'";
    $plugintablesraw = POD::queryColumn($query);
    if (count($plugintablesraw) <= 0) {
        Respond::ResultPage(1);
        exit;
    }
    $plugintables = array();
    foreach ($plugintablesraw as $dbname) {
        $origname = $dbname;
        $dbname = $database['prefix'] . substr($dbname, 9);
        if (!doesExistTable($dbname)) {
            Respond::ResultPage(1);
            exit;
        }
        if (in_array($dbname, $definedTables)) {
            Respond::ResultPage(1);
            exit;
开发者ID:ragi79,项目名称:Textcube,代码行数:31,代码来源:index.php

示例11: updateLink

function updateLink($blogid, $link)
{
    global $database;
    $id = $link['id'];
    $name = UTF8::lessenAsEncoding(trim($link['name']), 255);
    $url = UTF8::lessenAsEncoding(trim($link['url']), 255);
    if (empty($name) || empty($url)) {
        return false;
    }
    $category = isset($link['category']) ? $link['category'] : 0;
    $name = POD::escapeString($name);
    $url = POD::escapeString($url);
    if (isset($link['newCategory']) && !empty($link['newCategory'])) {
        // Add new category information
        $newCategoryTitle = UTF8::lessenAsEncoding(trim($link['newCategory']), 255);
        $newCategoryId = addLinkCategory($blogid, $newCategoryTitle);
        if (!empty($newCategoryId)) {
            $category = $newCategoryId;
        }
    }
    $rss = isset($link['rss']) ? POD::escapeString(UTF8::lessenAsEncoding(trim($link['rss']), 255)) : '';
    $result = POD::execute("UPDATE {$database['prefix']}Links\n\t\t\t\tSET\n\t\t\t\t\tcategory = {$category},\n\t\t\t\t\tname = '{$name}',\n\t\t\t\t\turl = '{$url}',\n\t\t\t\t\trss = '{$rss}',\n\t\t\t\t\twritten = UNIX_TIMESTAMP()\n\t\t\t\tWHERE\n\t\t\t\t\tblogid = {$blogid} and id = {$link['id']}");
    // Garbage correction
    $existCategories = POD::queryColumn("SELECT DISTINCT category FROM {$database['prefix']}Links\n\t\t\tWHERE blogid = {$blogid}");
    @POD::execute("DELETE FROM {$database['prefix']}LinkCategories\n\t\t\tWHERE blogid = {$blogid} AND id NOT IN (" . implode(",", $existCategories) . ")");
    return $result;
}
开发者ID:hinablue,项目名称:TextCube,代码行数:27,代码来源:blog.link.php

示例12: getFeedItemByEntries

function getFeedItemByEntries($entries)
{
    global $database, $serviceURL, $defaultURL, $blog, $service;
    $channelItems = array();
    foreach ($entries as $row) {
        $entryURL = $defaultURL . '/' . ($blog['useSloganOnPost'] ? 'entry/' . rawurlencode($row['slogan']) : $row['id']);
        $content = getEntryContentView($row['blogid'], $row['id'], $row['content'], $row['contentformatter'], true, 'Post', true, true);
        $content = preg_replace('/<a href=("|\')(#[^\\1]+)\\1/i', '<a href=$1' . htmlspecialchars($entryURL) . '$2$1', $content);
        if (!$blog['publishWholeOnRSS']) {
            $content .= "<p><strong><a href=\"" . htmlspecialchars($entryURL) . "\">" . _t('글 전체보기') . "</a></strong></p>";
        } else {
            $content .= "<p><strong><a href=\"" . htmlspecialchars($entryURL) . "?commentInput=true#entry" . $row['id'] . "WriteComment\">" . _t('댓글 쓰기') . "</a></strong></p>";
        }
        $row['repliesCount'] = $row['comments'] + $row['trackbacks'];
        $item = array('id' => $row['id'], 'title' => RSSMessage($row['title']), 'link' => $entryURL, 'categories' => array(), 'description' => RSSMessage($content), 'author' => RSSMessage($row['author']), 'pubDate' => $row['published'], 'updDate' => $row['modified'], 'comments' => $entryURL . '#entry' . $row['id'] . 'comment', 'guid' => "{$defaultURL}/" . $row['id'], 'replies' => array('count' => $row['repliesCount']));
        if (!empty($row['email'])) {
            $item['email'] = RSSMessage($row['email']);
        }
        if (isset($service['useNumericURLonRSS'])) {
            if ($service['useNumericURLonRSS'] == true) {
                $item['link'] = $defaultURL . "/" . $row['id'];
            }
        }
        if (!empty($row['id'])) {
            $sql = "SELECT name, size, mime FROM {$database['prefix']}Attachments WHERE parent= {$row['id']} AND blogid = {$row['blogid']} AND enclosure = 1";
            $attaches = POD::queryRow($sql);
            if (count($attaches) > 0) {
                $item['enclosure'] = array('url' => "{$serviceURL}/attach/{$blogid}/{$attaches['name']}", 'length' => $attaches['size'], 'type' => $attaches['mime']);
            }
        }
        array_push($item['categories'], $row['categoryName']);
        $tag_result = POD::queryColumn("SELECT name \n\t\t\t\tFROM {$database['prefix']}Tags, \n\t\t\t\t\t{$database['prefix']}TagRelations \n\t\t\t\tWHERE id = tag \n\t\t\t\t\tAND entry = {$row['id']}\n\t\t\t\t\tAND blogid = {$row['blogid']}\n\t\t\t\tORDER BY name");
        foreach ($tag_result as $tag) {
            array_push($item['categories'], $tag);
        }
        array_push($channelItems, $item);
    }
    return $channelItems;
}
开发者ID:hinablue,项目名称:TextCube,代码行数:39,代码来源:blog.feed.php

示例13: getEntriesWithPagingForOwner

function getEntriesWithPagingForOwner($blogid, $category, $search, $page, $count, $visibility = null, $starred = null, $draft = null, $tag = null)
{
    global $database, $suri;
    $teamMemberFilter = "";
    if (!Acl::check("group.editors", "entry.list")) {
        $teamMemberFilter = " AND e.userid = " . getUserId();
    }
    $sqlTable = "SELECT e.*, c.label AS categoryLabel, d.id AS draft \n\t\tFROM {$database['prefix']}Entries e \n\t\tLEFT JOIN {$database['prefix']}Categories c ON e.category = c.id AND e.blogid = c.blogid \n\t\tLEFT JOIN {$database['prefix']}Entries d ON e.blogid = d.blogid AND e.id = d.id AND d.draft = 1 ";
    $sql = " WHERE e.blogid = {$blogid} AND e.draft = 0" . $teamMemberFilter;
    if ($category > 0) {
        $categories = POD::queryColumn("SELECT id FROM {$database['prefix']}Categories WHERE blogid = {$blogid} AND parent = {$category}");
        array_push($categories, $category);
        $sql .= ' AND e.category IN (' . implode(', ', $categories) . ')';
    } else {
        if ($category == -3) {
            $sql .= ' AND e.category = 0';
        } else {
            if ($category == -5) {
                $sql .= ' AND e.category >= -2';
            } else {
                if ($category == 0) {
                    $sql .= ' AND e.category >= 0';
                } else {
                    $sql .= ' AND e.category = ' . $category;
                }
            }
        }
    }
    if (isset($visibility)) {
        if (Validator::isInteger($visibility, 0, 3)) {
            $sql .= ' AND e.visibility = ' . $visibility;
        } else {
            $sql .= ' AND e.visibility ' . $visibility;
        }
    }
    if (isset($starred)) {
        if (Validator::isInteger($starred, 0, 3)) {
            $sql .= ' AND e.starred = ' . $starred;
        } else {
            $sql .= ' AND e.starred ' . $starred;
        }
    }
    if (!empty($search)) {
        $search = escapeSearchString($search);
        $sql .= " AND (e.title LIKE '%{$search}%' OR e.content LIKE '%{$search}%')";
    }
    if (!empty($tag)) {
        $sqlTable .= " LEFT JOIN {$database['prefix']}TagRelations t ON e.id = t.entry AND e.blogid = t.blogid ";
        $sql .= ' AND t.tag = ' . $tag;
    }
    $sql .= ' ORDER BY e.published DESC';
    return Paging::fetch($sqlTable . $sql, $page, $count);
}
开发者ID:hinablue,项目名称:TextCube,代码行数:53,代码来源:blog.entry.php

示例14: deleteTagsWithEntryId

 function deleteTagsWithEntryId($blogid, $entry)
 {
     global $database;
     $taglist = POD::queryColumn("SELECT tag FROM {$database['prefix']}TagRelations WHERE blogid = {$blogid} AND entry = {$entry}");
     if (!is_null($taglist)) {
         $tagliststr = implode(',', $taglist);
         foreach ($taglist as $tagid) {
             CacheControl::flushTag($tagid);
         }
         POD::execute("DELETE FROM {$database['prefix']}TagRelations\n\t\t\t\tWHERE blogid = {$blogid} AND entry = {$entry}");
         $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} )");
         }
     }
 }
开发者ID:Avantians,项目名称:Textcube,代码行数:19,代码来源:Textcube.Data.Tag.php

示例15: array

$IV = array('GET' => array('range' => array('int', 'min' => -1, 'max' => 64, 'default' => -1)));
require ROOT . '/library/preprocessor.php';
require ROOT . '/interface/common/control/header.php';
requirePrivilege('group.creators');
function getSymbolByQuantity($bytes)
{
    $symbols = array('B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB');
    $exp = floor(log($bytes) / log(1024));
    return sprintf('%.2f ' . $symbols[$exp], $bytes / pow(1024, floor($exp)));
}
/* Current time */
$serverTime = strftime("Server Time: %Y-%m-%d %H:%M:%S %z (%Z)", time());
/* Database version */
$dbVersion = '';
//if( $service['dbms'] == 'mysql' ) {
$dbVersion = POD::queryColumn("SELECT VERSION()");
$dbVersion = "MySQL: " . $dbVersion[0];
$dbStat = preg_replace("/\\s{2,}/", "<br />", POD::stat());
//}
/* Webserver information */
$webServer = "Unknown";
if (function_exists('apache_get_version')) {
    $webServer = apache_get_version();
}
/* OS version */
$osVersion = "Unknown";
if (function_exists('php_uname')) {
    $osVersion = php_uname();
}
/* Disk space */
$totalSpace = getSymbolByQuantity(disk_total_space(dirname(__FILE__)));
开发者ID:ragi79,项目名称:Textcube,代码行数:31,代码来源:index.php


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