dede/sys_sql_info.php

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
/**
 * 数据表信息查看
 *
 * @version        $Id: sys_sql_info.php 1 22:28 2010年7月20日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require(dirname(__FILE__)."/config.php");
CheckPurview('sys_Data');
if(empty($dopost)) $dopost = "";
$dbdoc = new MakeDBDocument;
$dbdoc->show();

class MakeDBDocument
{
    var $dsql;
    function __construct()
    {
        global $dsql;
        $this->dsql = $dsql;
    }
    //分析具体表
    function analyse_table(&$tableinfo, $tablename)
    {
        $flines = explode("\n", $tableinfo);
        $addinfo = $tbinfo = $tb_comment = '';
        $fields = array();
        foreach($flines as $line)
        {
            $line = trim($line);
            if( $line=='' ) continue;
            if( preg_match('/CREATE TABLE/i', $line) ) continue;
            if( !preg_match('/`/', $line) )
            {
                $arr = '';
                preg_match("/ENGINE=([a-z]*)(.*)DEFAULT CHARSET=([a-z0-9]*)/i", $line, $arr);
                $tbinfo = "ENGINE=".$arr[1].'/CHARSET='.$arr[3];
                $arr = '';
                preg_match("/comment='([^']*)'/i", $line, $arr);
                if( isset($arr[1]) )
                {
                    $tb_comment = $arr[1];
                }
                continue;
            }
            if( preg_match('/KEY/', $line) )
            {
                $addinfo .= $line."<br />\n";
            }
            else
            {
                $arr = '';
                $nline = preg_replace("/comment '([^']*)'/i", '', $line);
                preg_match("/`([^`]*)` (.*)[,]{0,1}$/U", $nline, $arr);
                $f = $arr[1];
                $fields[ $f ][0] = $arr[2];
                $fields[ $f ][1] = '';
后面还有 89 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。