diff --git a/favicon.ico b/favicon.ico
new file mode 100644
index 00000000..54183254
Binary files /dev/null and b/favicon.ico differ
diff --git a/index.php b/index.php
new file mode 100644
index 00000000..b24d302e
--- /dev/null
+++ b/index.php
@@ -0,0 +1,29 @@
+
+// +----------------------------------------------------------------------
+
+// 检测PHP环境
+if(version_compare(PHP_VERSION,'5.5.5','<')) die('require PHP > 5.5.5 !');
+//error_reporting(E_ALL ^ E_NOTICE);//显示除去 E_NOTICE 之外的所有错误信息
+error_reporting(E_ERROR | E_WARNING | E_PARSE);//报告运行时错误
+//检测是否已安装CrmEb系统
+if(file_exists("./install/") && !file_exists("./install/install.lock")){
+ if($_SERVER['PHP_SELF'] != '/index.php'){
+ header("Content-type: text/html; charset=utf-8");
+ exit("请在域名根目录下安装,如:
www.xxx.com/index.php 正确
www.xxx.com/www/index.php 错误,域名后面不能圈套目录, 但项目没有根目录存放限制,可以放在任意目录,apache虚拟主机配置一下即可");
+ }
+ header('Location:/install/index.php');
+ exit();
+}
+// [ 应用入口文件 ]
+// 定义应用目录
+define('APP_PATH', __DIR__ . '/application/');
+// 加载框架引导文件
+require __DIR__ . '/thinkphp/start.php';
diff --git a/mysql.php b/mysql.php
new file mode 100644
index 00000000..e9ffad61
--- /dev/null
+++ b/mysql.php
@@ -0,0 +1,152 @@
+
+// +----------------------------------------------------------------------
+//访问方法 /mysql.php?pwd=******&table=表名为空所有表
+session_start();
+header("Content-type:text/html;charset=utf-8");
+
+/**
+ * 生成mysql数据字典
+ */
+// 配置数据库
+$database = array();
+$password = '327677';//访问密码GET['pwd'] 传输
+$database['DB_HOST'] = '127.0.0.1';
+$database['DB_NAME'] = 'shopcrmeb';//数据库名称
+$database['DB_USER'] = 'shopcrmeb';//用户名
+$database['DB_PWD'] = '5FYGH5d6zWZffrmA';//密码
+$char_set = 'UTF8';//数据库编码
+date_default_timezone_set('Asia/Shanghai');
+$mysql_conn = @mysqli_connect("{$database['DB_HOST']}", "{$database['DB_USER']}", "{$database['DB_PWD']}") or die("Mysql connect is error.");
+mysqli_select_db($mysql_conn,$database['DB_NAME']);
+$result = mysqli_query($mysql_conn,'show tables');
+mysqli_query($mysql_conn,'SET NAMES '.$char_set);
+
+$pwd = !empty($_GET['pwd'])?$_GET['pwd']:$_SESSION['pwd'];
+if($password != $pwd)exit('无权访问');
+$_SESSION['pwd'] = $pwd;
+
+if($_GET['table'])
+{
+ $tables[]['TABLE_NAME'] = $_GET['table'];
+}else{
+ // 取得所有表名
+ while ($row = mysqli_fetch_array($result))
+ {
+ $tables[]['TABLE_NAME'] = $row[0];
+ }
+}
+// 循环取得所有表的备注及表中列消息
+foreach($tables as $k => $v)
+{
+ $sql = 'SELECT * FROM ';
+ $sql .= 'INFORMATION_SCHEMA.TABLES ';
+ $sql .= 'WHERE ';
+ $sql .= "table_name = '{$v['TABLE_NAME']}' AND table_schema = '{$database['DB_NAME']}'";
+ $table_result = mysqli_query($mysql_conn,$sql);
+ while ($t = mysqli_fetch_array($table_result))
+ {
+ $tables[$k]['TABLE_COMMENT'] = $t['TABLE_COMMENT'];
+ }
+ $sql = 'SELECT * FROM ';
+ $sql .= 'INFORMATION_SCHEMA.COLUMNS ';
+ $sql .= 'WHERE ';
+ $sql .= "table_name = '{$v['TABLE_NAME']}' AND table_schema = '{$database['DB_NAME']}'";
+ $fields = array();
+ $field_result = mysqli_query($mysql_conn,$sql);
+ while ($t = mysqli_fetch_array($field_result))
+ {
+ $fields[] = $t;
+ }
+ $tables[$k]['COLUMN'] = $fields;
+}
+mysqli_close($mysql_conn);
+//print_r($tables);
+$html = '';
+if(isset($_GET['table']))
+{
+ $html .= '
生成时间:' . date('Y-m-d H:i:s') . '
'; + // 循环所有表 + foreach($tables as $k => $v) + { + $html .= '| 字段名 | 数据类型 | 默认值 | 允许非空 | 自动递增 | 备注 | ' . $f['COLUMN_NAME'] . ' | '; + $html .= '' . $f['COLUMN_TYPE'] . ' | '; + $html .= '' . $f['COLUMN_DEFAULT'] . ' | '; + $html .= '' . $f['IS_NULLABLE'] . ' | '; + $html .= '' . ($f['EXTRA'] == 'auto_increment'?'是':' ') . ' | '; + $html .= '' . $f['COLUMN_COMMENT'] . ' | '; + $html .= ''; + } + $html .= '
|---|
总共:' . count($v['COLUMN']) . '个字段
'; + $html .= '