소스 검색

修改为分享所需代码

chenbo 4 년 전
부모
커밋
8393cf1bd3
16개의 변경된 파일40개의 추가작업 그리고 468개의 파일을 삭제
  1. 0 6
      .idea/vcs.xml
  2. 0 30
      api/city.php
  3. 0 77
      api/demo/city.html
  4. 0 72
      api/demo/hangye.html
  5. 6 29
      api/demo/index.html
  6. 0 72
      api/demo/province.html
  7. 0 0
      api/demo/reader_login.html
  8. 0 25
      api/hangye.php
  9. 0 25
      api/province.php
  10. 0 0
      api/reader_login.php
  11. 6 17
      config_develop.inc.php
  12. 6 14
      config_online.inc.php
  13. 1 1
      index.php
  14. 0 39
      lib/reader.class.php
  15. 21 49
      lib/table/table_reader.class.php
  16. 0 12
      setting.inc.php

+ 0 - 6
.idea/vcs.xml

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="VcsDirectoryMappings">
-    <mapping directory="$PROJECT_DIR$" vcs="Git" />
-  </component>
-</project>

+ 0 - 30
api/city.php

@@ -1,30 +0,0 @@
-<?php
-/**
- * Created by PhpStorm.
- * User: wangming
- * Date: 2020/4/22
- * Time: 16:06
- */
-
-try{
-    $pid = safeCheck($_POST["pid"], 0);
-    if ((!empty($pid)) && ($pid > 0)) {
-        $rs = Address::getCityList($pid);
-        $cityList = array();
-        foreach($rs as $key => $val) {
-            $cityList[$key]['id'] = $val['id'];
-            $cityList[$key]['name'] = $val['name'];
-        }
-
-        echo action_msg($cityList, 200);
-    } else {
-        echo action_msg('省份ID错误', 101);
-    }
-
-    exit();
-
-}catch (MyException $e){
-    echo action_msg($e->getMessage(),$e->getCode());
-}
-
-?>

+ 0 - 77
api/demo/city.html

@@ -1,77 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-    <title>接口2:城市列表</title>
-    <script type="text/javascript" src="js/jquery.1.9.1.min.js"></script>
-    <script type="text/javascript" src="js/func.common.js"></script>
-    <script type="text/javascript" src="js/func.js"></script>
-    <script type="text/javascript" src="js/jquery.md5.js">//$.md5()</script>
-    <script type="text/javascript" src="js/jquery.base64.js">//$.base64.encode()</script>
-    <script src="js/c.js" type="text/javascript"></script>
-    <script src="js/urchin.js" type="text/javascript"></script>
-    <link href="css/s.css" type="text/css" rel="stylesheet">
-    <link href="css/base.css" type="text/css" rel="stylesheet">
-    <script type="text/javascript">
-        $(function(){
-            $('#btn').click(function(){
-                var method = $('input[name="method"]').val();
-                var timestamp =$('input[name="timestamp"]').val();
-                var sign = $.md5(method+timestamp);
-                var pid =$('input[name="pid"]').val();
-
-                $('#sign').val(sign);
-                $.ajax({
-                    type         : 'POST',
-                    data         : {
-                        method :method,
-                        timestamp :timestamp,
-                        sign   : sign,
-                        pid    : pid,
-                    },
-                    url : "../api.php",
-                    beforeSend :  function(data){
-                        $('#Canvas').html('<p>请求处理中...</p>');
-                    },
-                    success :     function(data){
-                        Process(data);
-                    },
-                    error :       function(request, errtext, e){
-                        $('#Canvas').html('<p><b>发生错误</b></p><p>'+request.status+'<br/>'+errtext+'</p>');
-                    }
-                });
-            });
-        });
-    </script>
-</head>
-<body>
-<div id="head"><p>接口2:城市列表</p></div>
-<div id="content">
-    <div id="left">
-        <div class ="message"><p>接口返回:</p></div>
-        <div id="Canvas" class="Canvas"></div>
-    </div>
-    <div id="right">
-        <div class ="message"><p>请求数据:</p></div>
-        <form>
-            <p>
-                <span>method:</span>
-                <input type="text" class="input-text"  name="method" value="city"/>
-            </p>
-            <p>
-                <span>timestamp:</span>
-                <input type="text" class="input-text"  name="timestamp" value="11111111"/>
-            </p>
-            <p>
-                <span>pid:(省份id)</span>
-                <input type="text" class="input-text"  name="pid" value="1"/>
-            </p>
-
-            <p><button class="button success small" id="btn" type="button">发送请求</button></p>
-        </form>
-    </div>
-</div>
-
-
-</body>
-</html>

+ 0 - 72
api/demo/hangye.html

@@ -1,72 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-    <title>接口3:行业列表</title>
-    <script type="text/javascript" src="js/jquery.1.9.1.min.js"></script>
-    <script type="text/javascript" src="js/func.common.js"></script>
-    <script type="text/javascript" src="js/func.js"></script>
-    <script type="text/javascript" src="js/jquery.md5.js">//$.md5()</script>
-    <script type="text/javascript" src="js/jquery.base64.js">//$.base64.encode()</script>
-    <script src="js/c.js" type="text/javascript"></script>
-    <script src="js/urchin.js" type="text/javascript"></script>
-    <link href="css/s.css" type="text/css" rel="stylesheet">
-    <link href="css/base.css" type="text/css" rel="stylesheet">
-    <script type="text/javascript">
-        $(function(){
-            $('#btn').click(function(){
-                var method = $('input[name="method"]').val();
-                var timestamp =$('input[name="timestamp"]').val();
-                var sign = $.md5(method+timestamp);
-
-                $('#sign').val(sign);
-                $.ajax({
-                    type         : 'POST',
-                    data         : {
-                        method :method,
-                        timestamp :timestamp,
-                        sign   : sign,
-
-                    },
-                    url : "../api.php",
-                    beforeSend :  function(data){
-                        $('#Canvas').html('<p>请求处理中...</p>');
-                    },
-                    success :     function(data){
-                        Process(data);
-                    },
-                    error :       function(request, errtext, e){
-                        $('#Canvas').html('<p><b>发生错误</b></p><p>'+request.status+'<br/>'+errtext+'</p>');
-                    }
-                });
-            });
-        });
-    </script>
-</head>
-<body>
-<div id="head"><p>接口3:行业列表</p></div>
-<div id="content">
-    <div id="left">
-        <div class ="message"><p>接口返回:</p></div>
-        <div id="Canvas" class="Canvas"></div>
-    </div>
-    <div id="right">
-        <div class ="message"><p>请求数据:</p></div>
-        <form>
-            <p>
-                <span>method:</span>
-                <input type="text" class="input-text"  name="method" value="hangye"/>
-            </p>
-            <p>
-                <span>timestamp:</span>
-                <input type="text" class="input-text"  name="timestamp" value="11111111"/>
-            </p>
-
-            <p><button class="button success small" id="btn" type="button">发送请求</button></p>
-        </form>
-    </div>
-</div>
-
-
-</body>
-</html>

+ 6 - 29
api/demo/index.html

@@ -8,7 +8,7 @@
 </head>
 <body>
 <div style="margin: 0 auto;width:80%;overflow:hidden;"><p style="font-size:28px;font-weight:bold;text-align:center;">
-    科尔卡诺v1.1接口一览表</p></div>
+    阅读裂变接口一览表</p></div>
 <div align="center" style="margin-bottom: 10px">
 
     <p>相关说明:接口安全校验方式:</p>
@@ -23,36 +23,13 @@
         <th class="n2">接口名字</th>
         <th class="n3">查看Demo</th>
         <th class="n4">下载文档</th>
-
     <tr class="top">
-        <th class="title" colspan="4">字典接口</th>
+        <th class="title" colspan="4">阅读和分享接口</th>
     </tr>
     <tr>
         <td class="n1">1</td>
-        <td class="n2"><a href="province.html" target="_blank">省份列表</a></td>
-        <td class="n3"><a href="province.html" target="_blank">查看Demo</a></td>
-        <td class="n4"><a href="#" target="_blank">下载文档</a></td>
-    </tr>
-    <tr>
-        <td class="n1">2</td>
-        <td class="n2"><a href="city.html" target="_blank">城市列表</a></td>
-        <td class="n3"><a href="city.html" target="_blank">查看Demo</a></td>
-        <td class="n4"><a href="#" target="_blank">下载文档</a></td>
-    </tr>
-    <tr>
-        <td class="n1">3</td>
-        <td class="n2"><a href="hangye.html" target="_blank">行业列表</a></td>
-        <td class="n3"><a href="hangye.html" target="_blank">查看Demo</a></td>
-        <td class="n4"><a href="#" target="_blank">下载文档</a></td>
-    </tr>
-
-    <tr class="top">
-        <th class="title" colspan="4">客户登录接口</th>
-    </tr>
-    <tr>
-        <td class="n1">4</td>
-        <td class="n2"><a href="common_guest_login.html" target="_blank">普通客户登录</a></td>
-        <td class="n3"><a href="common_guest_login.html" target="_blank">查看Demo</a></td>
+        <td class="n2"><a href="reader_login.html" target="_blank">阅读和分享</a></td>
+        <td class="n3"><a href="reader_login.html" target="_blank">查看Demo</a></td>
         <td class="n4"><a href="#" target="_blank">下载文档</a></td>
     </tr>
 
@@ -60,13 +37,13 @@
         <th class="title" colspan="4">微信登录和授权接口</th>
     </tr>
     <tr>
-        <td class="n1">5</td>
+        <td class="n1">2</td>
         <td class="n2"><a href="login.html" target="_blank">微信登录</a></td>
         <td class="n3"><a href="login.html" target="_blank">查看Demo</a></td>
         <td class="n4"><a href="#" target="_blank">下载文档</a></td>
     </tr>
     <tr>
-        <td class="n1">6</td>
+        <td class="n1">3</td>
         <td class="n2"><a href="auth.html" target="_blank">微信授权</a></td>
         <td class="n3"><a href="auth.html" target="_blank">查看Demo</a></td>
         <td class="n4"><a href="#" target="_blank">下载文档</a></td>

+ 0 - 72
api/demo/province.html

@@ -1,72 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-    <title>接口1:省份列表</title>
-    <script type="text/javascript" src="js/jquery.1.9.1.min.js"></script>
-    <script type="text/javascript" src="js/func.common.js"></script>
-    <script type="text/javascript" src="js/func.js"></script>
-    <script type="text/javascript" src="js/jquery.md5.js">//$.md5()</script>
-    <script type="text/javascript" src="js/jquery.base64.js">//$.base64.encode()</script>
-    <script src="js/c.js" type="text/javascript"></script>
-    <script src="js/urchin.js" type="text/javascript"></script>
-    <link href="css/s.css" type="text/css" rel="stylesheet">
-    <link href="css/base.css" type="text/css" rel="stylesheet">
-    <script type="text/javascript">
-        $(function(){
-            $('#btn').click(function(){
-                var method = $('input[name="method"]').val();
-                var timestamp =$('input[name="timestamp"]').val();
-                var sign = $.md5(method+timestamp);
-
-                $('#sign').val(sign);
-                $.ajax({
-                    type         : 'POST',
-                    data         : {
-                        method :method,
-                        timestamp :timestamp,
-                        sign   : sign,
-
-                    },
-                    url : "../api.php",
-                    beforeSend :  function(data){
-                        $('#Canvas').html('<p>请求处理中...</p>');
-                    },
-                    success :     function(data){
-                        Process(data);
-                    },
-                    error :       function(request, errtext, e){
-                        $('#Canvas').html('<p><b>发生错误</b></p><p>'+request.status+'<br/>'+errtext+'</p>');
-                    }
-                });
-            });
-        });
-    </script>
-</head>
-<body>
-<div id="head"><p>接口1:省份列表</p></div>
-<div id="content">
-    <div id="left">
-        <div class ="message"><p>接口返回:</p></div>
-        <div id="Canvas" class="Canvas"></div>
-    </div>
-    <div id="right">
-        <div class ="message"><p>请求数据:</p></div>
-        <form>
-            <p>
-                <span>method:</span>
-                <input type="text" class="input-text"  name="method" value="province"/>
-            </p>
-            <p>
-                <span>timestamp:</span>
-                <input type="text" class="input-text"  name="timestamp" value="11111111"/>
-            </p>
-
-            <p><button class="button success small" id="btn" type="button">发送请求</button></p>
-        </form>
-    </div>
-</div>
-
-
-</body>
-</html>

api/demo/common_guest_login.html → api/demo/reader_login.html


+ 0 - 25
api/hangye.php

@@ -1,25 +0,0 @@
-<?php
-/**
- * Created by PhpStorm.
- * User: wangming
- * Date: 2020/4/22
- * Time: 16:06
- */
-
-try{
-
-    $rs = Hangye::getList();
-    $hangyeList = array();
-    foreach($rs as $key => $val) {
-        $hangyeList[$key]['id'] = $val['id'];
-        $hangyeList[$key]['name'] = $val['name'];
-    }
-
-    echo action_msg($hangyeList, 200);
-    exit();
-
-}catch (MyException $e){
-    echo action_msg($e->getMessage(),$e->getCode());
-}
-
-?>

+ 0 - 25
api/province.php

@@ -1,25 +0,0 @@
-<?php
-/**
- * Created by PhpStorm.
- * User: wangming
- * Date: 2020/4/22
- * Time: 16:06
- */
-
-try{
-
-    $rs = Address::getProvinceList();
-    $provinceList = array();
-    foreach($rs as $key => $val) {
-        $provinceList[$key]['id'] = $val['id'];
-        $provinceList[$key]['name'] = $val['name'];
-    }
-
-    echo action_msg($provinceList, 200);
-    exit();
-
-}catch (MyException $e){
-    echo action_msg($e->getMessage(),$e->getCode());
-}
-
-?>

api/common_guest_login.php → api/reader_login.php


+ 6 - 17
config_develop.inc.php

@@ -18,31 +18,20 @@ header("content-type:text/html;charset=utf-8");
 date_default_timezone_set('PRC');              //时区设置,服务器放置在国外的需要打开此项
 session_start();
 //ob_start();
-define("PROJECTCODE",    'ZhimaPHP_Kano2021');          //项目编号,建议修改,每个项目应该不同
-$HTTP_PATH = 'https://kano.xazhima.com/';     //网站访问路径,根据实际情况修改,务必以“/”结尾。
+define("PROJECTCODE",    'ZhimaPHP_fission');          //项目编号,建议修改,每个项目应该不同
+$HTTP_PATH = 'https://fission.xazhima.com/';     //网站访问路径,根据实际情况修改,务必以“/”结尾。
 
 //数据库连接参数设置=======================================
 $DB_host   = 'localhost';                      //数据库地址
-$DB_user   = 'kano2021';                           //数据库用户
-$DB_pass   = '*kano2021#';                           //数据库用户密码
-$DB_name   = 'kano2021';                       //数据库名称
-$DB_prefix = 'kano_';
+$DB_user   = 'fission';                           //数据库用户
+$DB_pass   = '*fission#';                           //数据库用户密码
+$DB_name   = 'fission';                       //数据库名称
+$DB_prefix = 'fission_';
 
 //数据库调试等级,上线请关闭
 //0--关闭数据库错误信息 1--打印错误SQL到日志文件(默认) 2--打印所有SQL到日志文件
 $DB_DEBUG_LEVEL = 0;
 
 
-//define("MINI_APPID","wxfd6217762e542e86");
-//define("MINI_APPKEY","f9dc58ecbb6bcc451f61c65d5fd97b62");
-
-define("MINI_APPID","wxe4a21eb167fba01a");
-define("MINI_APPKEY","e202ff0c65eb02ad10c6d5493413596c");
-
-
-
-
-
-
 
 ?>

+ 6 - 14
config_online.inc.php

@@ -18,29 +18,21 @@ header("content-type:text/html;charset=utf-8");
 date_default_timezone_set('PRC');              //时区设置,服务器放置在国外的需要打开此项
 session_start();
 //ob_start();
-define("PROJECTCODE",    'ZhimaPHP_Kano2021');          //项目编号,建议修改,每个项目应该不同
-$HTTP_PATH = 'https://kano.xazhima.com/';     //网站访问路径,根据实际情况修改,务必以“/”结尾。
+define("PROJECTCODE",    'ZhimaPHP_fission');          //项目编号,建议修改,每个项目应该不同
+$HTTP_PATH = 'http://fission.xazhima.com/';     //网站访问路径,根据实际情况修改,务必以“/”结尾。
 
 //数据库连接参数设置=======================================
 $DB_host   = 'localhost';                      //数据库地址
-$DB_user   = 'kano2021';                           //数据库用户
-$DB_pass   = '*kano2021#';                           //数据库用户密码
-$DB_name   = 'kano2021';                       //数据库名称
-$DB_prefix = 'kano_';
+$DB_user   = 'fission';                           //数据库用户
+$DB_pass   = '*fission#';                           //数据库用户密码
+$DB_name   = 'fission';                       //数据库名称
+$DB_prefix = 'fission_';
 
 //数据库调试等级,上线请关闭
 //0--关闭数据库错误信息 1--打印错误SQL到日志文件(默认) 2--打印所有SQL到日志文件
 $DB_DEBUG_LEVEL = 0;
 
 
-//define("MINI_APPID","wxfd6217762e542e86");
-//define("MINI_APPKEY","f9dc58ecbb6bcc451f61c65d5fd97b62");
-
-define("MINI_APPID","wxe4a21eb167fba01a");
-define("MINI_APPKEY","e202ff0c65eb02ad10c6d5493413596c");
-
-
-
 
 
 ?>

+ 1 - 1
index.php

@@ -1,4 +1,4 @@
 <?php
 
 //首页
-header('Location: ./admin/index.php');
+header('Location: ./api/demo/index.html');

+ 0 - 39
lib/reader.class.php

@@ -31,45 +31,6 @@ class Common_guest{
         return $Table_common_guest->getInfoByOpenId($openId);
     }
 
-    static public function generateNewCode($id)
-    {
-        $Table_common_guest = new Table_common_guest();
-        return $Table_common_guest->generateNewCode($id);
-    }
-
-    static public function getPassInfo($id)
-    {
-        $guest = self::getInfoById($id);
-        if (empty($guest)) {
-            return 0;
-        }
-
-        //没有编号先生成编号
-        if (empty($guest['code'])) {
-            $newCode = self::generateNewCode($id);
-            $updateAttr = array(
-                'code' => $newCode,
-            );
-            self::update($id, $updateAttr);
-        }
-
-        //增加一次次数
-        $countAttr = array(
-            'count' => $guest['count'] + 1,
-        );
-        self::update($id, $countAttr);
-
-        //返回是否可以入场标记
-        $ret['id'] = $id;
-        $ret['type'] = 1;    //1-普通客户  2-经销商客户
-        $ret['msg'] = '允许入场';
-        $guest = self::getInfoById($id);
-        $ret['code'] = $guest['code'];
-        $ret['addtime'] = GetDateString($guest['addtime'], true);
-
-        return $ret;
-    }
-
     static public function add($attrs)
     {
         $Table_common_guest = new Table_common_guest();

+ 21 - 49
lib/table/table_reader.class.php

@@ -8,11 +8,11 @@
 
 
 
-class Table_common_guest extends Table
+class Table_reader extends Table
 {
 
-    protected $table_name = 'common_guest';//表名
-    protected $table_id = 'common_guest_id';//指定ID字段名称,必须
+    protected $table_name = 'fission';//表名
+    protected $table_id = 'fission_id';//指定ID字段名称,必须
     protected $table_status = '';//指定状态字段名称,如果有
     protected $table_order = '';//指定排序字段名称,如果有
 
@@ -22,22 +22,13 @@ class Table_common_guest extends Table
     {
         $attr = array();
 
-        $attr['id'] = 'common_guest_id';
-        $attr['code'] = 'common_guest_code';
-        $attr['phone'] = 'common_guest_phone';
-        $attr['wxopenid'] = 'common_guest_wxopenid';
-        $attr['name'] = 'common_guest_name';
-        $attr['sex'] = 'common_guest_sex';
-        $attr['province'] = 'common_guest_province';
-        $attr['city'] = 'common_guest_city';
-        $attr['detailaddress'] = 'common_guest_detailaddress';
-        $attr['hangye_id'] = 'common_guest_hangye_id';
-        $attr['addtime'] = 'common_guest_addtime';
-        $attr['count'] = 'common_guest_count';
-
-        //外键字段
-        $attr['hangye_name'] = 'hangye_name';
-
+        $attr['id'] = 'reader_id';
+        $attr['phone'] = 'reader_phone';
+        $attr['wxopenid'] = 'reader_wxopenid';
+        $attr['name'] = 'reader_name';
+        $attr['sex'] = 'reader_sex';
+        $attr['addtime'] = 'reader_addtime';
+        $attr['count'] = 'reader_count';
 
         return $attr;
     }
@@ -47,7 +38,7 @@ class Table_common_guest extends Table
 
         $id = $this->pdo->sql_check_input(array('number', $id));
 
-        $sql = "select * from " . $this->table_fullname . " where common_guest_id = $id limit 1";
+        $sql = "select * from " . $this->table_fullname . " where reader_id = $id limit 1";
 
         $rs = $this->pdo->sqlQuery($sql);
         $r = array();
@@ -66,7 +57,7 @@ class Table_common_guest extends Table
 
         $phone = $this->pdo->sql_check_input(array('string', $phone));
 
-        $sql = "select * from " . $this->table_fullname . " where common_guest_phone = $phone limit 1";
+        $sql = "select * from " . $this->table_fullname . " where reader_phone = $phone limit 1";
 
         $rs = $this->pdo->sqlQuery($sql);
         $r = array();
@@ -85,7 +76,7 @@ class Table_common_guest extends Table
 
         $openId = $this->pdo->sql_check_input(array('string', $openId));
 
-        $sql = "select * from " . $this->table_fullname . " where common_guest_wxopenid = $openId limit 1";
+        $sql = "select * from " . $this->table_fullname . " where reader_wxopenid = $openId limit 1";
 
         $rs = $this->pdo->sqlQuery($sql);
         $r = array();
@@ -99,32 +90,15 @@ class Table_common_guest extends Table
         }
     }
 
-    public function generateNewCode($id)
-    {
-        $id = $this->pdo->sql_check_input(array('number', $id));
-
-        //$sql = "select count(*) as c from " . $this->table_fullname . " where (common_guest_id < $id) and (common_guest_status = 1 or common_guest_status = 0)";
-        $sql = "select max(common_guest_code) as c from " . $this->table_fullname;
-        $rs = $this->pdo->sqlQuery($sql);
-        $count = $rs[0]['c'];
-        return sprintf('%04s', $count + 1);
-    }
-
-
     public function add($attr)
     {
         $param = array(
-            //'common_guest_code' => array('string', $attr['code']),
-            'common_guest_phone' => array('string', $attr['phone']),
-            'common_guest_wxopenid' => array('string', $attr['wxopenid']),
-            'common_guest_name' => array('string', $attr['name']),
-            'common_guest_sex' => array('number', $attr['sex']),
-            'common_guest_province' => array('number', $attr['province']),
-            'common_guest_city' => array('number', $attr['city']),
-            'common_guest_detailaddress' => array('string', $attr['detailaddress']),
-            'common_guest_hangye_id' => array('number', $attr['hangye_id']),
-            'common_guest_addtime' => array('number', time()),
-            'common_guest_count' => array('number', 0),
+            'reader_phone' => array('string', $attr['phone']),
+            'reader_wxopenid' => array('string', $attr['wxopenid']),
+            'reader_name' => array('string', $attr['name']),
+            'reader_sex' => array('number', $attr['sex']),
+            'reader_addtime' => array('number', time()),
+            'reader_count' => array('number', 0),
         );
 
         return $this->pdo->sqlinsert($this->table_fullname, $param);
@@ -137,7 +111,7 @@ class Table_common_guest extends Table
         );
 
         $where = array(
-            'common_guest_id' => array('number', $id)
+            'reader_id' => array('number', $id)
         );
 
         return $this->pdo->sqlupdate($this->table_fullname, $param, $where);
@@ -158,9 +132,7 @@ class Table_common_guest extends Table
 
         if ($count == 0) {//列表
 
-            $sql = "select aa.*, bb.hangye_name as hangye_name from " . $this->table_fullname ." as aa "
-                ." left join kano_hangye as bb on aa.common_guest_hangye_id=bb.hangye_id "
-                ." $where order by common_guest_addtime desc, common_guest_id desc";
+            $sql = "select * from " . $this->table_fullname . " $where order by reader_addtime desc, reader_id desc";
 
             if ($page > 0) {//分页
                 $startrow = ($page - 1) * $pagesize;

+ 0 - 12
setting.inc.php

@@ -54,20 +54,8 @@ $globalSexList = array(
 );
 
 
-//禁止标志
-$globalStatusList = array(
-    0 => '未知',
-    1 => '正常',
-    -1 => '失败',
-);
-
-
 //权限
 define("AUTH_ADMIN", 7001);                //超级管理员
 
-//禁止标志
-define("STATUS_UNKOWN", 0);
-define("STATUS_PASS", 1);
-define("STATUS_PROHIBITION", -1);
 
 ?>