亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? common.php

?? This is the script which used on 10minutemail.com for temporary email.
?? PHP
?? 第 1 頁 / 共 5 頁
字號:
<?php
// +----------------------------------------------------------------------+
// | PHP versions 4 and 5                                                 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1998-2007 Manuel Lemos, Tomas V.V.Cox,                 |
// | Stig. S. Bakken, Lukas Smith                                         |
// | All rights reserved.                                                 |
// +----------------------------------------------------------------------+
// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB  |
// | API as well as database abstraction for PHP applications.            |
// | This LICENSE is in the BSD license style.                            |
// |                                                                      |
// | Redistribution and use in source and binary forms, with or without   |
// | modification, are permitted provided that the following conditions   |
// | are met:                                                             |
// |                                                                      |
// | Redistributions of source code must retain the above copyright       |
// | notice, this list of conditions and the following disclaimer.        |
// |                                                                      |
// | Redistributions in binary form must reproduce the above copyright    |
// | notice, this list of conditions and the following disclaimer in the  |
// | documentation and/or other materials provided with the distribution. |
// |                                                                      |
// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken,    |
// | Lukas Smith nor the names of his contributors may be used to endorse |
// | or promote products derived from this software without specific prior|
// | written permission.                                                  |
// |                                                                      |
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS  |
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT    |
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS    |
// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE      |
// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,          |
// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
// |  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED  |
// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT          |
// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE          |
// | POSSIBILITY OF SUCH DAMAGE.                                          |
// +----------------------------------------------------------------------+
// | Author: Lukas Smith <smith@pooteeweet.org>                           |
// +----------------------------------------------------------------------+
//
// $Id: Common.php,v 1.128 2007/11/09 20:54:58 quipo Exp $

require_once 'MDB2/LOB.php';

/**
 * @package  MDB2
 * @category Database
 * @author   Lukas Smith <smith@pooteeweet.org>
 */

/**
 * MDB2_Driver_Common: Base class that is extended by each MDB2 driver
 *
 * To load this module in the MDB2 object:
 * $mdb->loadModule('Datatype');
 *
 * @package MDB2
 * @category Database
 * @author Lukas Smith <smith@pooteeweet.org>
 */
class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
{
    var $valid_default_values = array(
        'text'      => '',
        'boolean'   => true,
        'integer'   => 0,
        'decimal'   => 0.0,
        'float'     => 0.0,
        'timestamp' => '1970-01-01 00:00:00',
        'time'      => '00:00:00',
        'date'      => '1970-01-01',
        'clob'      => '',
        'blob'      => '',
    );

    /**
     * contains all LOB objects created with this MDB2 instance
     * @var array
     * @access protected
     */
    var $lobs = array();

    // }}}
    // {{{ getValidTypes()

    /**
     * Get the list of valid types
     *
     * This function returns an array of valid types as keys with the values
     * being possible default values for all native datatypes and mapped types
     * for custom datatypes.
     *
     * @return mixed array on success, a MDB2 error on failure
     * @access public
     */
    function getValidTypes()
    {
        $types = $this->valid_default_values;
        $db =& $this->getDBInstance();
        if (PEAR::isError($db)) {
            return $db;
        }
        if (!empty($db->options['datatype_map'])) {
            foreach ($db->options['datatype_map'] as $type => $mapped_type) {
                if (array_key_exists($mapped_type, $types)) {
                    $types[$type] = $types[$mapped_type];
                } elseif (!empty($db->options['datatype_map_callback'][$type])) {
                    $parameter = array('type' => $type, 'mapped_type' => $mapped_type);
                    $default =  call_user_func_array($db->options['datatype_map_callback'][$type], array(&$db, __FUNCTION__, $parameter));
                    $types[$type] = $default;
                }
            }
        }
        return $types;
    }

    // }}}
    // {{{ checkResultTypes()

    /**
     * Define the list of types to be associated with the columns of a given
     * result set.
     *
     * This function may be called before invoking fetchRow(), fetchOne()
     * fetchCole() and fetchAll() so that the necessary data type
     * conversions are performed on the data to be retrieved by them. If this
     * function is not called, the type of all result set columns is assumed
     * to be text, thus leading to not perform any conversions.
     *
     * @param array $types array variable that lists the
     *       data types to be expected in the result set columns. If this array
     *       contains less types than the number of columns that are returned
     *       in the result set, the remaining columns are assumed to be of the
     *       type text. Currently, the types clob and blob are not fully
     *       supported.
     * @return mixed MDB2_OK on success, a MDB2 error on failure
     * @access public
     */
    function checkResultTypes($types)
    {
        $types = is_array($types) ? $types : array($types);
        foreach ($types as $key => $type) {
            if (!isset($this->valid_default_values[$type])) {
                $db =& $this->getDBInstance();
                if (PEAR::isError($db)) {
                    return $db;
                }
                if (empty($db->options['datatype_map'][$type])) {
                    return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
                        $type.' for '.$key.' is not a supported column type', __FUNCTION__);
                }
            }
        }
        return $types;
    }

    // }}}
    // {{{ _baseConvertResult()

    /**
     * General type conversion method
     *
     * @param mixed   $value reference to a value to be converted
     * @param string  $type  specifies which type to convert to
     * @param boolean $rtrim [optional] when TRUE [default], apply rtrim() to text
     * @return object an MDB2 error on failure
     * @access protected
     */
    function _baseConvertResult($value, $type, $rtrim = true)
    {
        switch ($type) {
        case 'text':
            if ($rtrim) {
                $value = rtrim($value);
            }
            return $value;
        case 'integer':
            return intval($value);
        case 'boolean':
            return !empty($value);
        case 'decimal':
            return $value;
        case 'float':
            return doubleval($value);
        case 'date':
            return $value;
        case 'time':
            return $value;
        case 'timestamp':
            return $value;
        case 'clob':
        case 'blob':
            $this->lobs[] = array(
                'buffer' => null,
                'position' => 0,
                'lob_index' => null,
                'endOfLOB' => false,
                'resource' => $value,
                'value' => null,
                'loaded' => false,
            );
            end($this->lobs);
            $lob_index = key($this->lobs);
            $this->lobs[$lob_index]['lob_index'] = $lob_index;
            return fopen('MDB2LOB://'.$lob_index.'@'.$this->db_index, 'r+');
        }

        $db =& $this->getDBInstance();
        if (PEAR::isError($db)) {
            return $db;
        }

        return $db->raiseError(MDB2_ERROR_INVALID, null, null,
            'attempt to convert result value to an unknown type :' . $type, __FUNCTION__);
    }

    // }}}
    // {{{ convertResult()

    /**
     * Convert a value to a RDBMS indipendent MDB2 type
     *
     * @param mixed   $value value to be converted
     * @param string  $type  specifies which type to convert to
     * @param boolean $rtrim [optional] when TRUE [default], apply rtrim() to text
     * @return mixed converted value
     * @access public
     */
    function convertResult($value, $type, $rtrim = true)
    {
        if (is_null($value)) {
            return null;
        }
        $db =& $this->getDBInstance();
        if (PEAR::isError($db)) {
            return $db;
        }
        if (!empty($db->options['datatype_map'][$type])) {
            $type = $db->options['datatype_map'][$type];
            if (!empty($db->options['datatype_map_callback'][$type])) {
                $parameter = array('type' => $type, 'value' => $value, 'rtrim' => $rtrim);
                return call_user_func_array($db->options['datatype_map_callback'][$type], array(&$db, __FUNCTION__, $parameter));
            }
        }
        return $this->_baseConvertResult($value, $type, $rtrim);
    }

    // }}}
    // {{{ convertResultRow()

    /**
     * Convert a result row
     *
     * @param array   $types
     * @param array   $row   specifies the types to convert to
     * @param boolean $rtrim [optional] when TRUE [default], apply rtrim() to text
     * @return mixed MDB2_OK on success, an MDB2 error on failure
     * @access public
     */
    function convertResultRow($types, $row, $rtrim = true)
    {
        $types = $this->_sortResultFieldTypes(array_keys($row), $types);
        foreach ($row as $key => $value) {
            if (empty($types[$key])) {
                continue;
            }
            $value = $this->convertResult($row[$key], $types[$key], $rtrim);
            if (PEAR::isError($value)) {
                return $value;
            }
            $row[$key] = $value;
        }
        return $row;
    }

    // }}}
    // {{{ _sortResultFieldTypes()

    /**
     * convert a result row
     *
     * @param array $types
     * @param array $row specifies the types to convert to
     * @param bool   $rtrim   if to rtrim text values or not
     * @return mixed MDB2_OK on success,  a MDB2 error on failure
     * @access public
     */
    function _sortResultFieldTypes($columns, $types)
    {
        $n_cols = count($columns);
        $n_types = count($types);
        if ($n_cols > $n_types) {
            for ($i= $n_cols - $n_types; $i >= 0; $i--) {
                $types[] = null;
            }
        }
        $sorted_types = array();
        foreach ($columns as $col) {
            $sorted_types[$col] = null;
        }
        foreach ($types as $name => $type) {
            if (array_key_exists($name, $sorted_types)) {
                $sorted_types[$name] = $type;
                unset($types[$name]);
            }
        }
        // if there are left types in the array, fill the null values of the
        // sorted array with them, in order.
        if (count($types)) {
            reset($types);
            foreach (array_keys($sorted_types) as $k) {
                if (is_null($sorted_types[$k])) {
                    $sorted_types[$k] = current($types);
                    next($types);
                }
            }
        }
        return $sorted_types;
    }

    // }}}
    // {{{ getDeclaration()

    /**
     * Obtain DBMS specific SQL code portion needed to declare
     * of the given type
     *
     * @param string $type type to which the value should be converted to
     * @param string  $name   name the field to be declared.
     * @param string  $field  definition of the field
     * @return string  DBMS specific SQL code portion that should be used to
     *                 declare the specified field.
     * @access public
     */
    function getDeclaration($type, $name, $field)
    {
        $db =& $this->getDBInstance();
        if (PEAR::isError($db)) {
            return $db;
        }

        if (!empty($db->options['datatype_map'][$type])) {
            $type = $db->options['datatype_map'][$type];
            if (!empty($db->options['datatype_map_callback'][$type])) {
                $parameter = array('type' => $type, 'name' => $name, 'field' => $field);
                return call_user_func_array($db->options['datatype_map_callback'][$type], array(&$db, __FUNCTION__, $parameter));
            }
            $field['type'] = $type;
        }

        if (!method_exists($this, "_get{$type}Declaration")) {
            return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
                'type not defined: '.$type, __FUNCTION__);
        }
        return $this->{"_get{$type}Declaration"}($name, $field);
    }

    // }}}
    // {{{ getTypeDeclaration()

    /**
     * Obtain DBMS specific SQL code portion needed to declare an text type

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91视频在线看| 日韩欧美在线观看一区二区三区| 日韩一级在线观看| 成人午夜在线播放| 91精品国产免费| 亚洲图片欧美色图| 日韩成人伦理电影在线观看| 日韩一区二区三区四区| 国产69精品久久777的优势| 亚洲成av人片一区二区三区| 久久人人爽人人爽| 舔着乳尖日韩一区| 国产精品美女视频| 欧美久久一区二区| xfplay精品久久| 欧美日韩一区二区三区视频| 国产日韩精品视频一区| 91精品久久久久久久99蜜桃| 色综合久久中文字幕| 国产91精品一区二区| 精品一区二区三区免费观看| 成人av电影在线网| 久久99日本精品| 裸体一区二区三区| 日韩**一区毛片| 在线欧美一区二区| 伊人夜夜躁av伊人久久| 亚洲欧美视频在线观看| 91浏览器打开| gogogo免费视频观看亚洲一| 成人美女视频在线看| 99久久精品久久久久久清纯| 99精品国产热久久91蜜凸| 一区二区三区四区不卡视频| 国产精品美女一区二区在线观看| 国产精品情趣视频| 欧美视频一二三区| 麻豆成人久久精品二区三区红| 日本欧美大码aⅴ在线播放| 亚洲精品一区二区三区在线观看| 26uuu亚洲综合色欧美| 中文天堂在线一区| 欧美挠脚心视频网站| 精品少妇一区二区三区日产乱码 | 欧美成人女星排行榜| 国产成人精品三级| 午夜精品爽啪视频| 韩日精品视频一区| 一区二区三区中文字幕电影| 五月天国产精品| 亚洲三级视频在线观看| 亚洲成a人在线观看| 欧美激情综合五月色丁香| 538在线一区二区精品国产| wwwwxxxxx欧美| 欧美体内she精高潮| 国产成人精品影视| 日韩欧美一区二区不卡| 中文字幕在线不卡一区二区三区| 喷水一区二区三区| 亚洲成av人片一区二区梦乃 | 国内精品不卡在线| 欧美网站大全在线观看| 国产精品国产三级国产aⅴ中文| 亚洲成精国产精品女| gogo大胆日本视频一区| 日本一区二区成人| 国产丝袜欧美中文另类| 日韩电影一二三区| 欧美精品高清视频| 欧美一级欧美三级| 天堂一区二区在线| 蜜臀av一区二区在线观看| 欧美日韩精品电影| 欧美一区二区三区成人| 欧美一区二区在线播放| 五月天久久比比资源色| 欧美在线观看视频一区二区| 一区二区三区欧美久久| 五月婷婷久久综合| 91精品黄色片免费大全| 视频一区二区三区中文字幕| 日韩高清一区二区| 国产乱人伦偷精品视频不卡| 久久久国产综合精品女国产盗摄| 久草热8精品视频在线观看| 国产视频一区二区在线| 91亚洲精品久久久蜜桃网站 | 亚洲人成在线观看一区二区| 一本一道波多野结衣一区二区| 欧美综合天天夜夜久久| 亚洲一级二级三级| 蜜臀av性久久久久av蜜臀妖精| 国模大尺度一区二区三区| 亚洲国产精品精华液2区45| 99国产精品国产精品久久| 日韩不卡手机在线v区| 久久亚洲一区二区三区明星换脸| 色综合久久久网| 麻豆视频观看网址久久| 国产精品久久久久四虎| 欧美一区二区三区人| 亚洲天堂成人在线观看| 捆绑变态av一区二区三区| 国产精品丝袜久久久久久app| 欧美三级在线视频| 国产精品视频一二| 精品国产一区久久| 国产一区不卡精品| 亚洲va欧美va天堂v国产综合| 欧美在线999| 91麻豆swag| 一区二区三区四区在线| 国产在线国偷精品免费看| 亚洲欧美国产三级| 久久九九国产精品| 五月婷婷激情综合| 91在线视频播放| 国产精品天天摸av网| 久久久www免费人成精品| 在线不卡免费av| 天堂精品中文字幕在线| 欧美老女人在线| 国产精品免费观看视频| 欧美人狂配大交3d怪物一区| 亚洲欧美国产三级| 欧美视频在线观看一区二区| 成人av影视在线观看| 国产亚洲美州欧州综合国| 欧美日韩国产片| 欧美日韩国产精品自在自线| 91网站在线播放| 91亚洲大成网污www| 国产精品欧美一级免费| 99精品久久只有精品| 一本色道久久综合亚洲精品按摩| 成人av在线看| 一级日本不卡的影视| 亚洲最大色网站| 日韩精品1区2区3区| 91精品国产91久久综合桃花| 麻豆成人91精品二区三区| 欧美精品一区二区三区久久久| 国产成人在线视频免费播放| 欧美国产日韩亚洲一区| 一区二区三区中文字幕| 亚洲va韩国va欧美va精品| 日韩精品中文字幕一区二区三区 | 日本韩国欧美在线| 欧美精品在线观看一区二区| 久久综合网色—综合色88| 中文字幕亚洲综合久久菠萝蜜| 色一区在线观看| 国产黑丝在线一区二区三区| 亚洲国产精品视频| 综合在线观看色| 美美哒免费高清在线观看视频一区二区 | 91精品国产综合久久福利| 国产精品午夜春色av| 舔着乳尖日韩一区| 91社区在线播放| 韩国一区二区在线观看| 99国产精品国产精品毛片| 欧美不卡一区二区三区| 亚洲午夜久久久久久久久电影院 | 黑人巨大精品欧美一区| 欧美伊人久久大香线蕉综合69| 国产乱码字幕精品高清av | 亚洲人成精品久久久久| 国产一区二区三区精品视频| 欧美伦理电影网| 亚洲福利视频导航| 欧美变态口味重另类| 久久精品视频一区二区| 不卡的av电影| 日韩欧美国产综合一区| 日韩影视精彩在线| 欧美三级韩国三级日本一级| 欧美日韩国产bt| 欧美一区二区三区免费大片| 欧美电影精品一区二区| 青青青爽久久午夜综合久久午夜| 91.xcao| 美女视频一区在线观看| 精品理论电影在线| 国产成人免费高清| 欧美视频一区二区| 轻轻草成人在线| 国产99精品国产| 亚洲人精品一区| 日韩免费在线观看| 成人午夜又粗又硬又大| 欧美日韩一二区| 国产人妖乱国产精品人妖| av中文字幕在线不卡| 亚洲午夜精品网| 日韩限制级电影在线观看| 亚洲伦在线观看| 色老汉av一区二区三区| 国产在线精品一区二区夜色 |